Commit Graph

14 Commits

Author SHA1 Message Date
Max Horn
0ff979e56d COMMON: Document class MemoryPool; make MemoryPool::_chunkSize const
svn-id: r46282
2009-12-07 18:24:10 +00:00
Bertrand Augereau
9da3c5c716 COMMON: (Inactive) code to debug memory leaks in memory pools + typo fix
svn-id: r43990
2009-09-06 13:26:14 +00:00
Max Horn
6a632b51ad COMMON: Optimized MemoryPool::freeUnusedPages (if many pages are phased out at once, don't copy everything multiple times around)
svn-id: r40292
2009-05-03 22:45:46 +00:00
Jordi Vilalta Prat
b1999a2a16 Fixed indentation and removed whitespaces at the end of line
svn-id: r35481
2008-12-22 11:22:15 +00:00
Max Horn
2e20247ce7 Reset _chunksPerPage after MemoryPool::freeUnusedPages, to avoid enormous memory consumption in various easy to trigger situations; out of paranoia, prohibit for now memory chunks bigger than 16MB
svn-id: r34868
2008-10-30 17:45:35 +00:00
Max Horn
95474b048a COMMON: Added a new ObjectPool class, with matching operator new/delete overloads
svn-id: r34785
2008-10-12 22:05:26 +00:00
Max Horn
31ce5eb496 Revised HashMap implementation
svn-id: r34273
2008-09-02 11:34:12 +00:00
Max Horn
595be54083 cleanup
svn-id: r31391
2008-04-04 21:00:58 +00:00
Torbjörn Andersson
a03547dc8e Some minor whitespace changes, and the customary "end of namespace" comment.
svn-id: r31338
2008-03-30 18:53:16 +00:00
Bertrand Augereau
5f3529ce78 Whitespacing fixes
svn-id: r31330
2008-03-30 14:07:34 +00:00
Bertrand Augereau
7624cf28ab std::max => utils.h MAX
Added GPL headers

svn-id: r31324
2008-03-30 11:56:32 +00:00
Torbjörn Andersson
49e3efe55e Fixed signed/unsigned warning.
svn-id: r31322
2008-03-30 06:12:16 +00:00
Bertrand Augereau
a84d1ea78b The hashmap uses the memorypool for allocating/deallocating its Nodes
(It is faster and it saves approximately 70kB the DS or other small devices will appreciate having)

svn-id: r31321
2008-03-30 06:02:34 +00:00
Bertrand Augereau
411a588850 Introduction of a fixed size memory pool with a typical free list implementation
+ : 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
2008-03-30 05:42:39 +00:00