2002-08-12 14:50:19

by Udo A. Steinberg

[permalink] [raw]
Subject: VMA Merging


Hello,

I have a program which mmap's 320 MB from a file into memory in 4 KB chunks,
like this....

00002000-00003000 rw-s 00002000 03:46 688 /tmp/physmem (deleted)
00003000-00004000 rw-s 00003000 03:46 688 /tmp/physmem (deleted)
00004000-00005000 rw-s 00004000 03:46 688 /tmp/physmem (deleted)
00005000-00006000 rw-s 00005000 03:46 688 /tmp/physmem (deleted)
00006000-00007000 rw-s 00006000 03:46 688 /tmp/physmem (deleted)
00007000-00008000 rw-s 00007000 03:46 688 /tmp/physmem (deleted)
00008000-00009000 rw-s 00008000 03:46 688 /tmp/physmem (deleted)
00009000-0000a000 rw-s 00009000 03:46 688 /tmp/physmem (deleted)
0000a000-0000b000 rw-s 0000a000 03:46 688 /tmp/physmem (deleted)
0000b000-0000c000 rw-s 0000b000 03:46 688 /tmp/physmem (deleted)
0000c000-0000d000 rw-s 0000c000 03:46 688 /tmp/physmem (deleted)
0000d000-0000e000 rw-s 0000d000 03:46 688 /tmp/physmem (deleted)
0000e000-0000f000 rw-s 0000e000 03:46 688 /tmp/physmem (deleted)
0000f000-00010000 rw-s 0000f000 03:46 688 /tmp/physmem (deleted)
00010000-00011000 rw-s 00010000 03:46 688 /tmp/physmem (deleted)
00011000-00012000 rw-s 00011000 03:46 688 /tmp/physmem (deleted)
00012000-00013000 rw-s 00012000 03:46 688 /tmp/physmem (deleted)

The problem is that after 320 MB the program exceeds the maximum number
of 65536 VMA mappings. Why doesn't the kernel merge adjacent VMA's?

Regards,
-Udo.