Nix
2.26.3
Nix, the purely functional package manager; unstable internal interfaces
Loading...
Searching...
No Matches
eval-gc.hh
Go to the documentation of this file.
1
#pragma once
3
4
#include <cstddef>
5
6
#if HAVE_BOEHMGC
7
8
# define GC_INCLUDE_NEW
9
10
# include <gc/gc.h>
11
# include <gc/gc_cpp.h>
12
# include <gc/gc_allocator.h>
13
14
#else
15
16
# include <memory>
17
18
/* Some dummy aliases for Boehm GC definitions to reduce the number of
19
#ifdefs. */
20
21
template
<
typename
T>
22
using
traceable_allocator = std::allocator<T>;
23
24
template
<
typename
T>
25
using
gc_allocator = std::allocator<T>;
26
27
# define GC_MALLOC_ATOMIC std::malloc
28
29
struct
gc
30
{};
31
32
#endif
33
34
namespace
nix {
35
39
void
initGC();
40
44
void
assertGCInitialized();
45
46
#ifdef HAVE_BOEHMGC
50
size_t
getGCCycles();
51
#endif
52
53
}
// namespace nix
gc
Definition
eval-gc.hh:30
src
libexpr
eval-gc.hh
Generated by
1.13.2