1
0
forked from 0ad/0ad
0ad/source/lib/allocators
Ykkrosh 85e2e72eb7 Fix TestHeaderless failure on GCC 4.9.
Once 'delete' is called on an object, that object no longer exists, and
accessing its member variables is undefined behaviour. GCC 4.9's
optimiser recognises this, and eliminates any writes to member variables
inside the destructor, since it knows they cannot legally be read later.

BoundaryTagManager relied on ~FreedBlock resetting its memory to 0, so
this optimisation broke it. Replace the placement new/delete with plain
non-magic Setup/Reset functions, to avoid the optimisation.

Fixes #2481.

This was SVN commit r15334.
2014-06-11 19:50:38 +00:00
..
tests lay groundwork for more efficient and flexible allocators. add new sysdep/vm that provides access to additional features on Windows (large pages, autocommit). add Pool/Arena allocators that avoid overhead and support arbitrary storage (not just the expensive virtual memory allocator in DynArray) 2011-08-21 11:00:09 +00:00
aligned_allocator.h more minor fixes. rename uname.machine to x64 (less confusing than amd64) 2011-12-29 09:47:42 +00:00
allocator_adapters.h Set svn:eol-style=native, fix some inconsistent line endings 2013-12-06 00:42:50 +00:00
allocator_checker.h Set svn:eol-style=native, fix some inconsistent line endings 2013-12-06 00:42:50 +00:00
allocator_policies.h Set svn:eol-style=native, fix some inconsistent line endings 2013-12-06 00:42:50 +00:00
arena.cpp Set svn:eol-style=native, fix some inconsistent line endings 2013-12-06 00:42:50 +00:00
arena.h Set svn:eol-style=native, fix some inconsistent line endings 2013-12-06 00:42:50 +00:00
dynarray.cpp Fix printf argument types 2011-11-13 18:31:06 +00:00
dynarray.h lay groundwork for more efficient and flexible allocators. add new sysdep/vm that provides access to additional features on Windows (large pages, autocommit). add Pool/Arena allocators that avoid overhead and support arbitrary storage (not just the expensive virtual memory allocator in DynArray) 2011-08-21 11:00:09 +00:00
freelist.cpp Set svn:eol-style=native, fix some inconsistent line endings 2013-12-06 00:42:50 +00:00
freelist.h Set svn:eol-style=native, fix some inconsistent line endings 2013-12-06 00:42:50 +00:00
headerless.cpp Fix TestHeaderless failure on GCC 4.9. 2014-06-11 19:50:38 +00:00
headerless.h fix compile error due to GCC restriction. 2011-10-10 20:08:04 +00:00
overrun_protector.h Set svn:eol-style=native, fix some inconsistent line endings 2013-12-06 00:42:50 +00:00
page_aligned.cpp cleanup (requires update-workspaces) 2011-05-03 12:38:42 +00:00
page_aligned.h cleanup (requires update-workspaces) 2011-05-03 12:38:42 +00:00
pool.cpp lay groundwork for more efficient and flexible allocators. add new sysdep/vm that provides access to additional features on Windows (large pages, autocommit). add Pool/Arena allocators that avoid overhead and support arbitrary storage (not just the expensive virtual memory allocator in DynArray) 2011-08-21 11:00:09 +00:00
pool.h replace old pool_allocator/RawPoolAllocator with ProxyAllocator that draws upon the new-style Arena (more efficient, avoids slow VirtualAlloc) 2011-10-16 10:37:21 +00:00
shared_ptr.cpp split debug_assert into ENSURE and ASSERT as discussed in a previous meeting. 2011-04-30 13:01:45 +00:00
shared_ptr.h cleanup (requires update-workspaces) 2011-05-03 12:38:42 +00:00
unique_range.cpp Set svn:eol-style=native, fix some inconsistent line endings 2013-12-06 00:42:50 +00:00
unique_range.h Set svn:eol-style=native, fix some inconsistent line endings 2013-12-06 00:42:50 +00:00