Generic Memory Manager is the fastest cross-platform cross-compiler C++ memory management library. It is easy in use and easy extensible. It has clear design and implementation. For more info see project's website: http://memory-mgr.sourceforge.net
Be the first to post a text review of Generic Memory Manager. Rate and review a project by clicking thumbs up or thumbs down in the right column.
New features: - Memory segment manager - provides fuctionality of self extensible memory segment - Named objects allocation support Fixed bugz: - #1983057: offset pointer does not validate used memory manager - #1989078: managed_base does not validate passed memory manager - #1987919: chunks number and available memory calculated incorrectly - #2009127 "Size tracking works incorrectly with nothrow allocation" - #2021835 "deletion of null pointer brings assert failure" Implemented feature requests: - #1999606: move common decorator methods to decorator_base class - #1987888: add field to mgr traits that stores mem overhead per block Unit tests were reimplemented using boost::test framework And a lot of other improvements and small fixes (for more details see change log)
------------------------------------ Implemented feature requests: - #1999597: add methods which will return free/used memory * added usage_tracker decorator which will track memory usage ***************************************************************************************************************** Version 1.3.0b (svn rev. 368, September 21, 2008): ------------------------------------ Implemented feature requests: - #1999606: move common decorator methods to decorator_base class * moved common decorator methods to decorator_base class * added missed header includes * updated kdevelop projects configuration - #1987888: add field to mgr traits that stores mem overhead per block * overrode memory_overhead field in manager_traits for size_tracking ------------------------------------ Fixed bugz: - #1983057: offset pointer does not validate used memory manager * added validation of supported memory manager categories to get/set pointer methods - #1989078: managed_base does not validate passed memory manager * added validation of supported memory manager categories - #1987919: chunks number and available memory calculated incorrectly * Implemented unit test that catches allocations of invalid memory blocks * added test template class that calculates chunks numbers * added allocable_memory field to manager_traits class * implemented bitset/allocable memory calculation and balancing on compilation stage - #2009127 "Size tracking works incorrectly with nothrow allocation" * added checking of pointer that passed to deallocate and store_size methods - #2021835 "deletion of null pointer brings assert failure" * Added validation of the pointer (or offset) before operating with it * Added unit tests for deletion/deallocation of null pointer/invalid offset for all decorators and their combinations ------------------------------------ Implemented tasks: - #148941: Implement memory segment manager * started implementation of segment_manager * added unit test for segment_manager * updated implementation of memory segments constructors, now they can get segment id as parameter and use it to allocate segment memory * implemented allocate, deallocate, empty, free, clear and get_offset_base methods * added offset_to_pointer & pointer_to_offset methods to memory_manager class and to its decorators * updated decorator_base class * updated offset_to_pointer & pointer_to_offset helper functions implementation * added missed includes * added more unit tests for segment_manager * removed old unused code * moved helper methods to private section * implemented deallocation of managed segments in destructor * added performance tests for segment_manager with shared segments * implemented pointer to offset conversion * reimplemented deallocate and get_ptr_base methods * added performance tests for segment_manager * updated storing and searching of offset bases * changed unit tests for segment_manager * added allocable_chunks to manager_traits * updated VS 2005 unit_tests project * disabled optimization in unit_tests projects in release builds * updated helper macroses for test case * implemented storing and searching of offset bases * implemented calculation of the offset_bits at compilation time * moved retrieving of the segment id from offset to the static method * fixed static assertion in the int_log2 for (x > 0) * added precompiled header for performance tests project * updated implementation * moved implementation of segment_storage_map to individual file * implemented segment_storage_vector * removed get_segment method from derived classes of segment_storage_base * implemented const and non const variants of get_ptr_base and get_offset_base methods * added num_segments value to manager_traits to show (maximum) number of segments managed by this manager * fixed manager_traits for segment_manager to represent valid values of allocable_chunks and num_segments * added synchronization - #151069 Implement named objects allocation * implemented support of named objects * fixed implementation of named_objects to use the same manager to store names * implemented delete for named objects * added is_exist method to named_allocator * implemented new/new[] methods for named objects * added unit tests for new and named_objects * fixed implementation of named_objects to always store offsets, even when pointer_convert decorator is applied * fixed delete_arr_impl for delete[] overloads * fixed implementation of named_allocator, now map of object names stored in the attached segment * fixed issue with named_objects+segment_manager pair of decorators, now segment_manager creates segment with id 0 during creation * got rid of dependency of new operator in named_allocator constructor * added synchronization Known issue: * for correct work of named objects first memory manager instance should be created with free memory segment * named_allocator and named_objects have a lot of assumptions about applied decorators * single process objects supported only ------------------------------------ Other unit tests changes: - updated out_of_memory unit tests to use allocable_memory field of manager_traits instead of memory_size - migrated unit tests to BOOST::TEST framework - implemented check_pointers helper function which verifies validness of the pointers (offsets) and inequality of the pointers to each other - removed unused classes and files ------------------------------------ Other library changes: - added new method - clear() that deallocates all allocated memory blocks - made couple of values in static_bitset compile time constants - fixed clear() method, now it also clears cached data (bit_hint) - fixed allocator::max_size method implementation - replaced T on value_type in allocator class implementation - fixed memory chunks calculation - some minor cosmetic changes with comments and code alignments - renamed folder/projects managers to memory-mgr - updated includes - updated projects configuration - removed size_tracking and pointer_convert decorator from required for allocators - added offset_allocator class that works with offset_pointers - changed typedefs names in offset_pointer to match std iterator requirements - renamed free method into is_free to prevent name conflicts when crt alloc debug is enabled - updated allocator classes and pointer_traits according to the requirements of Generic STL library - refactored allocator class to have base class for singleton manager and member manager - added non default constructor for *_lockable classes - added to_pointer and to_offset helper functions - renamed get_pointer to get_pointer_internal and get_offset to get_offset_internal - renamed block_type on chunk_type - added chunk_type to manager_traits - fixed computation of bits_per_block in static_bitset - fixed implementation of to_pointer functions, used boost::remove_pointer and boost::remove_const to prevent instantiations with invalid pointer types - added block_id_type to memory_manager, traits and it's decorators - implemented block_id_converter class which can be used to convert objects of offset_type and/or pointer_type to block_id_type of the top decorator - added block_id_converter_type to the manager_traits - added template parameter T to to_pointer functions to compound conversions from block_id_type to pointer and type cast - started implementation of the operator new emulation using templates (e.g. new_<int>( 1 ) ) - moved all mathematic functions to math namespace in math.h - implemented int_log2 template which calculates log2 at compile time ------------------------------------ Performance tests changes: - changed size of pointers track array to strore only required number of pointers - changed implementations of performance tests, now you can specify how many times to repeat each test block - fixed implementations of test blocks, now they clean up resources at the end of block - used memory_overhead field in performance tests to calculate required memory size
------------------------------------ Implemented feature requests: - #1999597: add methods which will return free/used memory * added usage_tracker decorator which will track memory usage ***************************************************************************************************************** Version 1.3.0b (svn rev. 368, September 21, 2008): ------------------------------------ Implemented feature requests: - #1999606: move common decorator methods to decorator_base class * moved common decorator methods to decorator_base class * added missed header includes * updated kdevelop projects configuration - #1987888: add field to mgr traits that stores mem overhead per block * overrode memory_overhead field in manager_traits for size_tracking ------------------------------------ Fixed bugz: - #1983057: offset pointer does not validate used memory manager * added validation of supported memory manager categories to get/set pointer methods - #1989078: managed_base does not validate passed memory manager * added validation of supported memory manager categories - #1987919: chunks number and available memory calculated incorrectly * Implemented unit test that catches allocations of invalid memory blocks * added test template class that calculates chunks numbers * added allocable_memory field to manager_traits class * implemented bitset/allocable memory calculation and balancing on compilation stage - #2009127 "Size tracking works incorrectly with nothrow allocation" * added checking of pointer that passed to deallocate and store_size methods - #2021835 "deletion of null pointer brings assert failure" * Added validation of the pointer (or offset) before operating with it * Added unit tests for deletion/deallocation of null pointer/invalid offset for all decorators and their combinations ------------------------------------ Implemented tasks: - #148941: Implement memory segment manager * started implementation of segment_manager * added unit test for segment_manager * updated implementation of memory segments constructors, now they can get segment id as parameter and use it to allocate segment memory * implemented allocate, deallocate, empty, free, clear and get_offset_base methods * added offset_to_pointer & pointer_to_offset methods to memory_manager class and to its decorators * updated decorator_base class * updated offset_to_pointer & pointer_to_offset helper functions implementation * added missed includes * added more unit tests for segment_manager * removed old unused code * moved helper methods to private section * implemented deallocation of managed segments in destructor * added performance tests for segment_manager with shared segments * implemented pointer to offset conversion * reimplemented deallocate and get_ptr_base methods * added performance tests for segment_manager * updated storing and searching of offset bases * changed unit tests for segment_manager * added allocable_chunks to manager_traits * updated VS 2005 unit_tests project * disabled optimization in unit_tests projects in release builds * updated helper macroses for test case * implemented storing and searching of offset bases * implemented calculation of the offset_bits at compilation time * moved retrieving of the segment id from offset to the static method * fixed static assertion in the int_log2 for (x > 0) * added precompiled header for performance tests project * updated implementation * moved implementation of segment_storage_map to individual file * implemented segment_storage_vector * removed get_segment method from derived classes of segment_storage_base * implemented const and non const variants of get_ptr_base and get_offset_base methods * added num_segments value to manager_traits to show (maximum) number of segments managed by this manager * fixed manager_traits for segment_manager to represent valid values of allocable_chunks and num_segments * added synchronization - #151069 Implement named objects allocation * implemented support of named objects * fixed implementation of named_objects to use the same manager to store names * implemented delete for named objects * added is_exist method to named_allocator * implemented new/new[] methods for named objects * added unit tests for new and named_objects * fixed implementation of named_objects to always store offsets, even when pointer_convert decorator is applied * fixed delete_arr_impl for delete[] overloads * fixed implementation of named_allocator, now map of object names stored in the attached segment * fixed issue with named_objects+segment_manager pair of decorators, now segment_manager creates segment with id 0 during creation * got rid of dependency of new operator in named_allocator constructor * added synchronization Known issue: * for correct work of named objects first memory manager instance should be created with free memory segment * named_allocator and named_objects have a lot of assumptions about applied decorators * single process objects supported only ------------------------------------ Other unit tests changes: - updated out_of_memory unit tests to use allocable_memory field of manager_traits instead of memory_size - migrated unit tests to BOOST::TEST framework - implemented check_pointers helper function which verifies validness of the pointers (offsets) and inequality of the pointers to each other - removed unused classes and files ------------------------------------ Other library changes: - added new method - clear() that deallocates all allocated memory blocks - made couple of values in static_bitset compile time constants - fixed clear() method, now it also clears cached data (bit_hint) - fixed allocator::max_size method implementation - replaced T on value_type in allocator class implementation - fixed memory chunks calculation - some minor cosmetic changes with comments and code alignments - renamed folder/projects managers to memory-mgr - updated includes - updated projects configuration - removed size_tracking and pointer_convert decorator from required for allocators - added offset_allocator class that works with offset_pointers - changed typedefs names in offset_pointer to match std iterator requirements - renamed free method into is_free to prevent name conflicts when crt alloc debug is enabled - updated allocator classes and pointer_traits according to the requirements of Generic STL library - refactored allocator class to have base class for singleton manager and member manager - added non default constructor for *_lockable classes - added to_pointer and to_offset helper functions - renamed get_pointer to get_pointer_internal and get_offset to get_offset_internal - renamed block_type on chunk_type - added chunk_type to manager_traits - fixed computation of bits_per_block in static_bitset - fixed implementation of to_pointer functions, used boost::remove_pointer and boost::remove_const to prevent instantiations with invalid pointer types - added block_id_type to memory_manager, traits and it's decorators - implemented block_id_converter class which can be used to convert objects of offset_type and/or pointer_type to block_id_type of the top decorator - added block_id_converter_type to the manager_traits - added template parameter T to to_pointer functions to compound conversions from block_id_type to pointer and type cast - started implementation of the operator new emulation using templates (e.g. new_<int>( 1 ) ) - moved all mathematic functions to math namespace in math.h - implemented int_log2 template which calculates log2 at compile time ------------------------------------ Performance tests changes: - changed size of pointers track array to strore only required number of pointers - changed implementations of performance tests, now you can specify how many times to repeat each test block - fixed implementations of test blocks, now they clean up resources at the end of block - used memory_overhead field in performance tests to calculate required memory size
Project's web-site was fixed.
------------------------------------ Implemented feature requests: - #1999597: add methods which will return free/used memory * added usage_tracker decorator which will track memory usage ***************************************************************************************************************** Version 1.3.0b (svn rev. 368, September 21, 2008): ------------------------------------ Implemented feature requests: - #1999606: move common decorator methods to decorator_base class * moved common decorator methods to decorator_base class * added missed header includes * updated kdevelop projects configuration - #1987888: add field to mgr traits that stores mem overhead per block * overrode memory_overhead field in manager_traits for size_tracking ------------------------------------ Fixed bugz: - #1983057: offset pointer does not validate used memory manager * added validation of supported memory manager categories to get/set pointer methods - #1989078: managed_base does not validate passed memory manager * added validation of supported memory manager categories - #1987919: chunks number and available memory calculated incorrectly * Implemented unit test that catches allocations of invalid memory blocks * added test template class that calculates chunks numbers * added allocable_memory field to manager_traits class * implemented bitset/allocable memory calculation and balancing on compilation stage - #2009127 "Size tracking works incorrectly with nothrow allocation" * added checking of pointer that passed to deallocate and store_size methods - #2021835 "deletion of null pointer brings assert failure" * Added validation of the pointer (or offset) before operating with it * Added unit tests for deletion/deallocation of null pointer/invalid offset for all decorators and their combinations ------------------------------------ Implemented tasks: - #148941: Implement memory segment manager * started implementation of segment_manager * added unit test for segment_manager * updated implementation of memory segments constructors, now they can get segment id as parameter and use it to allocate segment memory * implemented allocate, deallocate, empty, free, clear and get_offset_base methods * added offset_to_pointer & pointer_to_offset methods to memory_manager class and to its decorators * updated decorator_base class * updated offset_to_pointer & pointer_to_offset helper functions implementation * added missed includes * added more unit tests for segment_manager * removed old unused code * moved helper methods to private section * implemented deallocation of managed segments in destructor * added performance tests for segment_manager with shared segments * implemented pointer to offset conversion * reimplemented deallocate and get_ptr_base methods * added performance tests for segment_manager * updated storing and searching of offset bases * changed unit tests for segment_manager * added allocable_chunks to manager_traits * updated VS 2005 unit_tests project * disabled optimization in unit_tests projects in release builds * updated helper macroses for test case * implemented storing and searching of offset bases * implemented calculation of the offset_bits at compilation time * moved retrieving of the segment id from offset to the static method * fixed static assertion in the int_log2 for (x > 0) * added precompiled header for performance tests project * updated implementation * moved implementation of segment_storage_map to individual file * implemented segment_storage_vector * removed get_segment method from derived classes of segment_storage_base * implemented const and non const variants of get_ptr_base and get_offset_base methods * added num_segments value to manager_traits to show (maximum) number of segments managed by this manager * fixed manager_traits for segment_manager to represent valid values of allocable_chunks and num_segments * added synchronization - #151069 Implement named objects allocation * implemented support of named objects * fixed implementation of named_objects to use the same manager to store names * implemented delete for named objects * added is_exist method to named_allocator * implemented new/new[] methods for named objects * added unit tests for new and named_objects * fixed implementation of named_objects to always store offsets, even when pointer_convert decorator is applied * fixed delete_arr_impl for delete[] overloads * fixed implementation of named_allocator, now map of object names stored in the attached segment * fixed issue with named_objects+segment_manager pair of decorators, now segment_manager creates segment with id 0 during creation * got rid of dependency of new operator in named_allocator constructor * added synchronization Known issue: * for correct work of named objects first memory manager instance should be created with free memory segment * named_allocator and named_objects have a lot of assumptions about applied decorators * single process objects supported only ------------------------------------ Other unit tests changes: - updated out_of_memory unit tests to use allocable_memory field of manager_traits instead of memory_size - migrated unit tests to BOOST::TEST framework - implemented check_pointers helper function which verifies validness of the pointers (offsets) and inequality of the pointers to each other - removed unused classes and files ------------------------------------ Other library changes: - added new method - clear() that deallocates all allocated memory blocks - made couple of values in static_bitset compile time constants - fixed clear() method, now it also clears cached data (bit_hint) - fixed allocator::max_size method implementation - replaced T on value_type in allocator class implementation - fixed memory chunks calculation - some minor cosmetic changes with comments and code alignments - renamed folder/projects managers to memory-mgr - updated includes - updated projects configuration - removed size_tracking and pointer_convert decorator from required for allocators - added offset_allocator class that works with offset_pointers - changed typedefs names in offset_pointer to match std iterator requirements - renamed free method into is_free to prevent name conflicts when crt alloc debug is enabled - updated allocator classes and pointer_traits according to the requirements of Generic STL library - refactored allocator class to have base class for singleton manager and member manager - added non default constructor for *_lockable classes - added to_pointer and to_offset helper functions - renamed get_pointer to get_pointer_internal and get_offset to get_offset_internal - renamed block_type on chunk_type - added chunk_type to manager_traits - fixed computation of bits_per_block in static_bitset - fixed implementation of to_pointer functions, used boost::remove_pointer and boost::remove_const to prevent instantiations with invalid pointer types - added block_id_type to memory_manager, traits and it's decorators - implemented block_id_converter class which can be used to convert objects of offset_type and/or pointer_type to block_id_type of the top decorator - added block_id_converter_type to the manager_traits - added template parameter T to to_pointer functions to compound conversions from block_id_type to pointer and type cast - started implementation of the operator new emulation using templates (e.g. new_<int>( 1 ) ) - moved all mathematic functions to math namespace in math.h - implemented int_log2 template which calculates log2 at compile time ------------------------------------ Performance tests changes: - changed size of pointers track array to strore only required number of pointers - changed implementations of performance tests, now you can specify how many times to repeat each test block - fixed implementations of test blocks, now they clean up resources at the end of block - used memory_overhead field in performance tests to calculate required memory size
Performance improvements: - 10% fixed memory alignment for static_bitset that used by bit_manager, now bitset is uses memory starting from fifth byte, first four bytes used by bit_manager, updated malloc_allocator and memory_manager constructor comments to fit this changes - 250% changed caching algorithm in bit_manager, now instead of caching of the block index used in for previous allocation, it will cache bit_hint - a bit number that used as a hint for static_bitset for find_n operation, it points to: prev_alloc_bit+prev_alloc_bits_count. - 20-25% implemented alignment of allocatable memory area. for this purpose was implemented template that can round integer value to specified base value. - 10-15% removed update_size routine from size_tracking implementation ------------ = 300% ------------------------------------ Implemented feature requests: - #1929433: Refactore implementation of shared memory allocators. * Refactored shared segment classes using NVI design pattern. * Made signatures of OS dependent APIs (for memory mapping) identical ------------------------------------ Fixed bugz: - #1983655: "allocator class implementation is incorrect" - #1981817: "It's impossible to use memory segment as first decorator" * Added default constructor to memory_manager class, it will generate compile time error if used * Added default constructor to pointer_convert and size_tracking classes, it will generate compile time error if decorated memory manager doesn't have attached memory segment * Added memory_segment_tag which indicates that memory manager has attached memory segment * Added memory_segment_tag to manager_category of manager_traits for memory_segment * Removed explicit templates instantiation from unit tests - #1981826: "Heap and shared segments provides invalid manager_traits" * Changed base class' template specialization parameters for manager_traits for segments - #1985090: "vector_as_allocator works too slow" * implemented malloc_allocator that uses malloc/free to alloc/dealloc memory segment * moved vector_as_allocator to separate file * changed allocator heap_segment to malloc_allocator instead of vector_as_allocator - #1986144: "memory leaks in performance tests" * alloc(new) test function were updated, now they track all allocated objects, and before exit they deallocate these objects - #1986138: "alloc/dealloc tests implemented incorrectly" * alloc/dealloc tests were reimplemented to fit required test-scenario - #1986130: "there is a lot of code duplications in performance tests" * source code was refactored to use the same function for common tests - 1985107: "allocator does not validate memory manager type" * Implemented validation of memory manager categories in allocator's constructor ------------------------------------ Tasks: - #148941: "Implement memory segment manager" * added additional parameter to get_base - offset, so, now to get offset's base address you have to pass this offset to get_base method * renamed get_base method of memory_manager and it's decorators into get_offset_base * added two additional methods (get_segment_base and get_ptr_base) that return base addresses for memory segment and for specified pointer * added segment_manager class ------------------------------------ Other: - added footer and stylesheet for doxy documentation - fixed precompiled header project settings for VS2005 - marked all managers functions as inline - enabled inlining and optimization for VS 2005 perf_tests project - updated comments for bit_manager memory_manager - used allocator class for std::string class in unit tests and performance tests - implemented stub to prevent showing of assert box when quiting from performance test in debug build - added time stamp to perf_results file name - added perf test for (external) GC Allocator - ScopeAlloc - just to compare performance - changed optimization level for VS2005 projects
Performance improvements: - 10% fixed memory alignment for static_bitset that used by bit_manager, now bitset is uses memory starting from fifth byte, first four bytes used by bit_manager, updated malloc_allocator and memory_manager constructor comments to fit this changes - 250% changed caching algorithm in bit_manager, now instead of caching of the block index used in for previous allocation, it will cache bit_hint - a bit number that used as a hint for static_bitset for find_n operation, it points to: prev_alloc_bit+prev_alloc_bits_count. - 20-25% implemented alignment of allocatable memory area. for this purpose was implemented template that can round integer value to specified base value. - 10-15% removed update_size routine from size_tracking implementation ------------ = 300% ------------------------------------ Implemented feature requests: - #1929433: Refactore implementation of shared memory allocators. * Refactored shared segment classes using NVI design pattern. * Made signatures of OS dependent APIs (for memory mapping) identical ------------------------------------ Fixed bugz: - #1983655: "allocator class implementation is incorrect" - #1981817: "It's impossible to use memory segment as first decorator" * Added default constructor to memory_manager class, it will generate compile time error if used * Added default constructor to pointer_convert and size_tracking classes, it will generate compile time error if decorated memory manager doesn't have attached memory segment * Added memory_segment_tag which indicates that memory manager has attached memory segment * Added memory_segment_tag to manager_category of manager_traits for memory_segment * Removed explicit templates instantiation from unit tests - #1981826: "Heap and shared segments provides invalid manager_traits" * Changed base class' template specialization parameters for manager_traits for segments - #1985090: "vector_as_allocator works too slow" * implemented malloc_allocator that uses malloc/free to alloc/dealloc memory segment * moved vector_as_allocator to separate file * changed allocator heap_segment to malloc_allocator instead of vector_as_allocator - #1986144: "memory leaks in performance tests" * alloc(new) test function were updated, now they track all allocated objects, and before exit they deallocate these objects - #1986138: "alloc/dealloc tests implemented incorrectly" * alloc/dealloc tests were reimplemented to fit required test-scenario - #1986130: "there is a lot of code duplications in performance tests" * source code was refactored to use the same function for common tests - 1985107: "allocator does not validate memory manager type" * Implemented validation of memory manager categories in allocator's constructor ------------------------------------ Tasks: - #148941: "Implement memory segment manager" * added additional parameter to get_base - offset, so, now to get offset's base address you have to pass this offset to get_base method * renamed get_base method of memory_manager and it's decorators into get_offset_base * added two additional methods (get_segment_base and get_ptr_base) that return base addresses for memory segment and for specified pointer * added segment_manager class ------------------------------------ Other: - added footer and stylesheet for doxy documentation - fixed precompiled header project settings for VS2005 - marked all managers functions as inline - enabled inlining and optimization for VS 2005 perf_tests project - updated comments for bit_manager memory_manager - used allocator class for std::string class in unit tests and performance tests - implemented stub to prevent showing of assert box when quiting from performance test in debug build - added time stamp to perf_results file name - added perf test for (external) GC Allocator - ScopeAlloc - just to compare performance - changed optimization level for VS2005 projects
Copyright © 2009 Geeknet, Inc. All rights reserved. Terms of Use
Thanks for your rating!
Would you also like to write a review?