aboutsummaryrefslogtreecommitdiff
path: root/common/memorypool.cpp
AgeCommit message (Collapse)Author
2014-02-18COMMON: Make GPL headers consistent in themselves.Johannes Schickel
2013-12-17COMMON: Revert "Fix mismatched new/delete in the MemoryPool class".Johannes Schickel
This reverts commit b585addc23de25c019f250986d50c0373219571d. The allocation of MemoryPool's page memory is doing in MemoryPool::allocPage, which uses ::malloc, thus we need to use ::free to free the page memory in MemoryPool::freeUnusedPages.
2013-12-17COMMON: Fix mismatched new/delete in the MemoryPool classFilippos Karapetis
Memory is allocated with new in Hashmap::allocNode() and incorrectly freed with free() in ~MemoryPool() and freeUnusedPages(). Issue reported by Dr. Memory
2012-02-15JANITORIAL: Fix missing whitespace in pointer castTarek Soliman
find -name '*.h' -or -name '*.cpp' | xargs sed -r -i 's@\(([A-Za-z0-9]+)\*\)@(\1 *)@g' This seems to have caught some params as well which is not undesirable IMO. It also caught some strings containing this which is undesirable so I excluded them manually. (engines/sci/engine/kernel_tables.h)
2011-08-07JANITORIAL: Remove trailing empty lines.Christoph Mallon
2011-05-12GIT: Clean up: Suppress SVN tags, now uselessstrangerke
2010-11-01COMMON: Change some (f)printf to debug calls; clenaup hashmap.hMax Horn
svn-id: r54003
2010-03-20Some style fixes.Johannes Schickel
svn-id: r48313
2009-12-07COMMON: Document class MemoryPool; make MemoryPool::_chunkSize constMax Horn
svn-id: r46282
2009-09-06COMMON: (Inactive) code to debug memory leaks in memory pools + typo fixBertrand Augereau
svn-id: r43990
2009-05-03COMMON: Optimized MemoryPool::freeUnusedPages (if many pages are phased out ↵Max Horn
at once, don't copy everything multiple times around) svn-id: r40292
2008-12-22Fixed indentation and removed whitespaces at the end of lineJordi Vilalta Prat
svn-id: r35481
2008-10-30Reset _chunksPerPage after MemoryPool::freeUnusedPages, to avoid enormous ↵Max Horn
memory consumption in various easy to trigger situations; out of paranoia, prohibit for now memory chunks bigger than 16MB svn-id: r34868
2008-10-12COMMON: Added a new ObjectPool class, with matching operator new/delete ↵Max Horn
overloads svn-id: r34785
2008-09-02Revised HashMap implementationMax Horn
svn-id: r34273
2008-04-04cleanupMax Horn
svn-id: r31391
2008-03-30Some minor whitespace changes, and the customary "end of namespace" comment.Torbjörn Andersson
svn-id: r31338
2008-03-30Whitespacing fixesBertrand Augereau
svn-id: r31330
2008-03-30std::max => utils.h MAXBertrand Augereau
Added GPL headers svn-id: r31324
2008-03-30Fixed signed/unsigned warning.Torbjörn Andersson
svn-id: r31322
2008-03-30The hashmap uses the memorypool for allocating/deallocating its NodesBertrand Augereau
(It is faster and it saves approximately 70kB the DS or other small devices will appreciate having) svn-id: r31321
2008-03-30Introduction of a fixed size memory pool with a typical free list implementationBertrand Augereau
+ : amortized O(1) allocation, O(1) deallocation, less overhead per allocation - : unused memory is not reclaimed until death or manual invocation of a function svn-id: r31320