Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+
2021-12-26 18:48:43 +01:00
Bastien Bouclet
955e18c648
COMMON: Use nullptr instead of NULL or 0 where appropriate
2018-05-10 08:35:46 +02:00
Adrian Frühwirth
3747d852ee
JANITORIAL: Fix whitespace
2018-04-15 16:31:31 +02:00
Johannes Schickel
854e22b38b
COMMON: Make GPL headers consistent in themselves.
2014-02-18 02:39:33 +01:00
Johannes Schickel
3a8c243d34
COMMON: Revert "Fix mismatched new/delete in the MemoryPool class".
...
This reverts commit b585addc23
.
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-17 00:26:50 +01:00
Filippos Karapetis
b585addc23
COMMON: Fix mismatched new/delete in the MemoryPool class
...
Memory is allocated with new in Hashmap::allocNode() and incorrectly
freed with free() in ~MemoryPool() and freeUnusedPages().
Issue reported by Dr. Memory
2013-12-17 01:16:28 +02:00
Tarek Soliman
a4798602d7
JANITORIAL: Fix missing whitespace in pointer cast
...
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)
2012-02-15 10:07:10 -06:00
Christoph Mallon
23a0f5318c
JANITORIAL: Remove trailing empty lines.
2011-08-07 13:53:33 +02:00
strangerke
69b1485a22
GIT: Clean up: Suppress SVN tags, now useless
2011-05-12 01:16:22 +02:00
Max Horn
7a85365004
COMMON: Change some (f)printf to debug calls; clenaup hashmap.h
...
svn-id: r54003
2010-11-01 16:00:53 +00:00
Johannes Schickel
e117783379
Some style fixes.
...
svn-id: r48313
2010-03-20 13:18:47 +00:00
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