Vmalloc - A Discipline and Method Library for Memory Allocation
Vmalloc is a library for dynamic memory allocation. It enables applications to create and allocate from regions of memory. Each region has an application-defined discipline and a library-provided method. A Vmalloc discipline primarily defines the memory type to be used. This may include shared, memory mapped, heap memory or even memory obtained from another region. Other uses of disciplines are for handling various exceptions that may arise during allocation. A Vmalloc method defines the allocation policy in a region. An allocation policy would then define the memory lay-out as well as the data structures and algorithms used to efficiently allocate memory. The current set of methods include:
Vmalloc provides a malloc interface for backward compatibility. This implementation of malloc is instrumented with the Vmalloc methods so that an application can select a particular allocation policy at program start-up time via environment variables. For example, to debug memory errors, an application can set the environment variable VMDEBUG=1 before invocation to use the method Vmdebug instead of the default method Vmbest. Then, as memories are allocated and freed, allocation errors and memory corruptions will be reported. In this way, normal execution retains good performance but debugging is still possible when needed without recompilation or relinking.
The current distribution is Vmalloc2002. This version of library is portable to all C and C++ flavors. A number of new functions have been added including one to open a region based on memory mapping. Such regions are automatically backed up to secondary storage for data persistence. An example to build persistent containers based on the container data type library Cdt is given in the distribution.
Below are papers related to Vmalloc
Software Installation NotesThe package should be unpacked in a root installation directory, say ``Software'', to create the below directory tree:
Software / NOTICE README include / [headers (ast_common.h, vmalloc.h)] lib / [libraries (libvmalloc.a)] bin / [commands (iffe)] man / man1 / [command manual pages (iffe.1)] / man3 / [library manual pages (vmalloc.3)] src / lib / vmalloc / [vmalloc source code] NOTICE README features / [feature probes] Vmalloc_t / [regression tests for Vmalloc] Vmalloc_ex / [example program(s)]The README file tells how to build Vmalloc.
Comments/Questions/ProblemsContact Phong Vo at: firstname.lastname@example.org.
Except for configuration problems in building the package, a bug report should be in the form of a small program that I can compile and run. Without such a program, I will likely ignore the report since it often takes too much time for me to tell if a reported bug is real or if it's just a misuse of the code.