G. Maly
2007-07-30 14:34:05 UTC
Consider an application that does many memory allocations via malloc/new
(bkr/sbrk). Each of the allocations is less than the page size. The
application frees the most of the allocated blocks, but some of the latter
allocated blocks are still in use, so that memory consumption remains high -
a typical case of memory fragmentation.
Possible solution could be usage of a malloc-replacement library. Does any
of these libraries call internally, for example, mmap instead of brk, even
for small blocks?
Does anybody of you have positive experience with such a library which:
- runs on Linux/x86-64
- helps to avoid fragmentation
- has good performance in multi-threaded environment
- ideally, doesn't need any changes in the application's code (dyn.load via
LD_PRELOAD)
- is stable ;)
Thanks,
Gennady
(bkr/sbrk). Each of the allocations is less than the page size. The
application frees the most of the allocated blocks, but some of the latter
allocated blocks are still in use, so that memory consumption remains high -
a typical case of memory fragmentation.
Possible solution could be usage of a malloc-replacement library. Does any
of these libraries call internally, for example, mmap instead of brk, even
for small blocks?
Does anybody of you have positive experience with such a library which:
- runs on Linux/x86-64
- helps to avoid fragmentation
- has good performance in multi-threaded environment
- ideally, doesn't need any changes in the application's code (dyn.load via
LD_PRELOAD)
- is stable ;)
Thanks,
Gennady