source: src/examples/gc_no_raii/gc-internal/object_header.h @ 15db1ab

ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsctordeferred_resndemanglerenumforall-pointer-decaygc_noraiijacob/cs343-translationjenkins-sandboxmemorynew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newwith_gc
Last change on this file since 15db1ab was 15db1ab, checked in by Thierry Delisle <tdelisle@…>, 8 years ago

added some files for the garbage collector and hack together the compilation

  • Property mode set to 100644
File size: 366 bytes
Line 
1#pragma once
2
3#include <stdint.h>
4
5#include "tools.h"
6
7static const void* CANARY_VALUE = (void*)0xCAFEBABACAFEBABA;
8
9struct gcpointer_t;
10
11struct gc_object_header
12{
13        #if _DEBUG
14                void* canary_start;
15        #endif
16
17        size_t          size;
18        gcpointer_t*    root_chain;
19        gcpointer_t*    type_chain;
20        object_header*  forward;
21        bool                    is_forwarded;
22
23        #if _DEBUG
24                void* canary_end;
25        #endif
26};
Note: See TracBrowser for help on using the repository browser.