diff options
author | John Wiegley <johnw@newartisans.com> | 2013-04-29 16:36:29 -0500 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2013-04-29 16:36:29 -0500 |
commit | 59550b7f66c31592160749c5177074f63d19fa9d (patch) | |
tree | 0b28be9ab403e67d042f74ae9d1d76d885486b18 /src/utils.cc | |
parent | 385cbd25b9905b16a4c7723bb4e5a5813e84aab0 (diff) | |
parent | 6bef247759acbdc026624e78d0fd78297bc79501 (diff) | |
download | ledger-59550b7f66c31592160749c5177074f63d19fa9d.tar.gz ledger-59550b7f66c31592160749c5177074f63d19fa9d.tar.bz2 ledger-59550b7f66c31592160749c5177074f63d19fa9d.zip |
Merge branch 'next'
Diffstat (limited to 'src/utils.cc')
-rw-r--r-- | src/utils.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/utils.cc b/src/utils.cc index 1a82787d..2f592325 100644 --- a/src/utils.cc +++ b/src/utils.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003-2012, John Wiegley. All rights reserved. + * Copyright (c) 2003-2013, John Wiegley. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -153,6 +153,8 @@ std::size_t current_memory_size() return memory_size; } +//#if !defined(__has_feature) || !__has_feature(address_sanitizer) + static void trace_new_func(void * ptr, const char * which, std::size_t size) { if (! live_memory || ! memory_tracing_active) return; @@ -221,8 +223,12 @@ static void trace_delete_func(void * ptr, const char * which) memory_tracing_active = true; } +//#endif // !defined(__has_feature) || !__has_feature(address_sanitizer) + } // namespace ledger +//#if !defined(__has_feature) || !__has_feature(address_sanitizer) + void * operator new(std::size_t size) throw (std::bad_alloc) { void * ptr = std::malloc(size); if (DO_VERIFY() && ledger::memory_tracing_active) @@ -268,6 +274,8 @@ void operator delete[](void * ptr, const std::nothrow_t&) throw() { std::free(ptr); } +//#endif // !defined(__has_feature) || !__has_feature(address_sanitizer) + namespace ledger { namespace { |