#pragma once ///@file #include #if HAVE_BOEHMGC # define GC_INCLUDE_NEW # include # include # include #else # include /* Some dummy aliases for Boehm GC definitions to reduce the number of #ifdefs. */ template using traceable_allocator = std::allocator; template using gc_allocator = std::allocator; # define GC_MALLOC_ATOMIC std::malloc struct gc {}; #endif namespace nix { /** * Initialise the Boehm GC, if applicable. */ void initGC(); /** * Make sure `initGC` has already been called. */ void assertGCInitialized(); #ifdef HAVE_BOEHMGC /** * The number of GC cycles since initGC(). */ size_t getGCCycles(); #endif } // namespace nix