vibe-core/source/vibe/internal
Sönke Ludwig 27e0019e44 Fix regression in FreeListRef where no memory was allocated for the ref count. Fixes #1432.
Commit 6be5471 switched FreeListRef to use FreeListObjectAlloc underneath, but didn't accound for the extra memory that is needed to store the reference count directly after the object payload. The possible implications of this are memory corruption and memory leaks, although with the predefined allocator setip, this will only happen to types with a POT size or slightly less.

This commit adds an "EXTRA" template type parameter to FreeListObjectAlloc that is used to determine the additional amount of allocated memory, which is set to "int" in the case of FreeListRef.

(cherry picked from commit d78a9ce89b845e4f89a84bd70bbd48c7595463d4)

(cherry picked from commit 613d15926e241c03e75bb2d237d39ba712613aeb)
2016-04-10 14:40:39 +02:00
..
array.d Initial commit. 2016-03-01 20:30:42 +01:00
async.d Initial commit. 2016-03-01 20:30:42 +01:00
hashmap.d Initial commit. 2016-03-01 20:30:42 +01:00
memory.d Fix regression in FreeListRef where no memory was allocated for the ref count. Fixes #1432. 2016-04-10 14:40:39 +02:00
string.d Initial commit. 2016-03-01 20:30:42 +01:00
traits.d Initial commit. 2016-03-01 20:30:42 +01:00
typetuple.d Initial commit. 2016-03-01 20:30:42 +01:00