Libumem
libumem is a memory allocator userspace library used to manage memory allocation,{{ cite web |title=Proceedings of the 2001 USENIX Annual Technical Conference |date=2001 |publisher=The USENIX Association |url=https://www.usenix.org/legacy/publications/library/proceedings/usenix01/full_papers/bonwick/bonwick.pdf }}{{cite web |title=github / omniti-labs / portableumem |date=27 Jun 2010 |access-date=2020-08-04 |publisher=github.com |url=https://github.com/omniti-labs/portableumem }} and may be used to detect memory management bugs in applications. It is based on the Slab allocator concept. Libumem is available as a standard part of Solaris from Solaris 9 Update 3 onwards.
Functions
Functions in this library provide fast, scalable object-caching memory allocation with multithreaded application support. In addition to the standard malloc(3C) family of functions and the more flexible umem_alloc(3MALLOC) family, libumem provides powerful object-caching services as described in umem_cache_create(3MALLOC).{{Cite web |url=https://blogs.oracle.com/dlutz/entry/memory_leak_detection_with_libumem |title=Memory Leak Detection with libumem |access-date=2013-10-22 |archive-url=https://web.archive.org/web/20131023055511/https://blogs.oracle.com/dlutz/entry/memory_leak_detection_with_libumem |archive-date=2013-10-23 |url-status=dead }}
Getting started with libumem is easy; just set LD_PRELOAD to "libumem.so" and any program executed will use libumem's malloc(3C) and free(3C) (or new and delete). {{Cite web |url=https://blogs.oracle.com/ahl/entry/solaris_10_top_11_20 |title=Adam Leventhal's Weblog |archive-url=https://web.archive.org/web/20170325113113/https://blogs.oracle.com/ahl/entry/solaris_10_top_11_20 |archive-date=2017-03-25 |url-status=dead }} This slab allocator is designed for systems with many threads and many CPUs. Memory allocation with naive allocators can be a serious bottleneck.
See also
Sources
{{reflist}}
- [http://labs.omniti.com/labs/portableumem Portable Umem: An opensource effort to port libumem to other UNIX-like systems]
{{Memory management}}
{{Solaris}}