Sign Up for Free ObjectLock Demo!
One of our featured products is the Mem Block system library. This library provides applications with internal memory allocation and debugging capabilities. It is an optimizing memory allocator which additionally provides capabilities for detecting common memory allocation and deallocation errors.
The system is coded in C++ and provides classic C malloc interface to applications as well as C++ operator new interfaces. The system provides an internal per thread memory pool for use by the application. The system is thread safe and provides performance optimization for applications. Additionally, the library provides an ability for customizing the allocator for specific needs. For example, the allocator can be optimized to allocate fixed sized memory blocks of a specific size. Example usage of the allocator can be found here Mem Block usage.
The system provides an interface to a low-level block memory allocator. The block memory allocator provides methods to allocate and deallocate memory of specific fixed sized blocks. Additionally, the system can tell if an address was allocated by it. This is useful for determining if memory was indeed allocated by Mem Block and whether or not it was released. The underlying block memory allocator can continously allocate memory as required. Additionally, it provides a method for determining memory usage providing the user with statistics regarding the number of used and free blocks. In addition to a generic fixed block memory allocator, the system provides customized int and double memory allocators for allocating fixed blocks of integers and double floating point types.
The higher level interfaces to Mem Block provide C memory allocation routines such as malloc, realloc, calloc, and free. These interfaces are built upon the low-level block allocator. They behave in a similar manner to the application code as the built-in allocators. The exception being that they are optimized.
At the highest level are the C++ interfaces to operator new and operator delete. These are implemented by Mem Block and provide optimized memory allocation for application code. In order to utilize Mem Block in Object Oriented code, the user includes the special header file 'mem_block_new.h' within a given class declaration. That class then has new and delete declared for it, and can begin using Mem Block's interface for memory allocation and deallocation.
Mem Block provides for debugging functionality when compiled with memory debugging enabled. The 'check_memory()' function checks the fragmentation of the allocator. Additionally, there are checks for common memory problems such as double free, where a pointer is freed more than once. The system can also check for free of NULL pointer or a free on a pointer that was not allocated by Mem Block. Furthermore, Mem Block provides an ability for checking if a write occurs outside of bounds.
Mem Block provides an ability for the allocator to be calibrated based on the size of blocks that the allocator will be providing. The system does this by allowing the user to run the allocator with debugging turned on, and a special method called 'show_map()' is called to generate a map of the sizes that the allocator was requested to allocate. The sizes can then be given to the allocator on startup to allow it to configure itself for optimized memory allocation for the sizes the application code requires. Additionally, the user may specify a custom map instructing the allocator on how to optimize its allocations.
To obtain a license of the Mem Block library, you may contact SALES directly via Email. Or alternatively, you may purchase your license using PayPal. Licenses do not include support. Support licenses require separate agreement.
Copyright (C) 2008. rdoss.com. All Rights Reserved.