[Monetdb-developers] mmap region resizing
monetdb at quidecco.de
Tue Jan 26 03:59:08 CET 2010
While figuring out some things related to memory management, I
stumbled upon a line in MonetDB/src/gdk/gdk_posix.mx which I don't
munmap(p + oldsize, oldsize - newsize);
..which is called from MT_vmrealloc when the old size is larger than
the new size. This would unmap a region as large as the size
difference between both sizes, but after the currently mapped region
[p; p + oldsize[ (which is probably not mapped, or is mapped to
something unrelated). The attached patch changes this behavior so the
resulting mapped region will be [p; p + newsize[, with the now
unneeded [p + newsize; p + oldsize[ region being unmapped (which is a
behavior I find more intuitive).
Please review and use as it fits.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 374 bytes
Desc: not available
More information about the developers-list