source:
src/examples/gc_no_raii/src/internal/object_header.h
@
00ede9e
Last change on this file since 00ede9e was d67a9a1, checked in by , 9 years ago | |
---|---|
|
|
File size: 606 bytes |
Rev | Line | |
---|---|---|
[15db1ab] | 1 | #pragma once |
2 | ||
[e47f529] | 3 | #include <stddef.h> |
[15db1ab] | 4 | #include <stdint.h> |
5 | ||
6 | #include "tools.h" | |
7 | ||
[6be0cf9] | 8 | #if DEBUG |
9 | static const void* CANARY_VALUE = (void*)0xCAFEBABACAFEBABA; | |
10 | #endif | |
[15db1ab] | 11 | |
12 | struct gcpointer_t; | |
[6be0cf9] | 13 | struct gc_object_header; |
[15db1ab] | 14 | |
15 | struct gc_object_header | |
16 | { | |
[6be0cf9] | 17 | #if DEBUG |
[15db1ab] | 18 | void* canary_start; |
19 | #endif | |
20 | ||
[6be0cf9] | 21 | size_t size; |
22 | gcpointer_t* root_chain; | |
23 | gcpointer_t* type_chain; | |
24 | gc_object_header* forward; | |
25 | bool is_forwarded; | |
[15db1ab] | 26 | |
[6be0cf9] | 27 | #if DEBUG |
[15db1ab] | 28 | void* canary_end; |
29 | #endif | |
30 | }; | |
[6be0cf9] | 31 | |
32 | gc_object_header* gc_object_header_placement_ctor(void* address, size_t size); | |
[d67a9a1] | 33 | gc_object_header* gc_object_header_placement_copy_ctor(void* address, gc_object_header* other); |
Note: See TracBrowser
for help on using the repository browser.