mirror of
https://github.com/gperftools/gperftools
synced 2025-01-25 16:33:52 +00:00
check debug_malloc_implementation_space via COMPILE_ASSERT
Because we can and because compile-time is always better.
This commit is contained in:
parent
54568e32fc
commit
71a239e559
@ -1083,8 +1083,8 @@ static union {
|
|||||||
|
|
||||||
REGISTER_MODULE_INITIALIZER(debugallocation, {
|
REGISTER_MODULE_INITIALIZER(debugallocation, {
|
||||||
#if (__cplusplus >= 201103L)
|
#if (__cplusplus >= 201103L)
|
||||||
RAW_CHECK(alignof(debug_malloc_implementation_space) >= alignof(DebugMallocImplementation),
|
COMPILE_ASSERT(alignof(debug_malloc_implementation_space) >= alignof(DebugMallocImplementation),
|
||||||
"debug_malloc_implementation_space is not properly aligned");
|
debug_malloc_implementation_space_is_not_properly_aligned);
|
||||||
#endif
|
#endif
|
||||||
// Either we or valgrind will control memory management. We
|
// Either we or valgrind will control memory management. We
|
||||||
// register our extension if we're the winner. Otherwise let
|
// register our extension if we're the winner. Otherwise let
|
||||||
|
Loading…
Reference in New Issue
Block a user