Changeset 16cfd8c for src/examples/gc_no_raii/src/internal/collector.h
- Timestamp:
- Apr 21, 2016, 4:54:33 PM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 8a74081
- Parents:
- 8c8b614
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/examples/gc_no_raii/src/internal/collector.h
r8c8b614 r16cfd8c 1 1 #pragma once 2 2 3 #include <stddef.h> 4 #include <stdint.h> 3 #include <stdlib> 5 4 6 5 #include "tools.h" … … 14 13 #include "tools/worklist.h" 15 14 16 inline bool gc_is_managed(void* address)15 static inline bool gc_is_managed(void* address) 17 16 { 18 17 return gc_is_in_heap(gc_get_state(), address); 19 18 } 20 19 21 inline gc_object_header* gc_get_object_ptr(void* ptr)20 static inline gc_object_header* gc_get_object_ptr(void* ptr) 22 21 { 23 22 void* clean = gc_get_aligned_ptr(ptr); … … 25 24 } 26 25 27 inline struct gc_memory_pool* gc_pool_of(void* address)26 static inline struct gc_memory_pool* gc_pool_of(void* address) 28 27 { 29 28 return (struct gc_memory_pool*)(((intptr_t)address) & POOL_PTR_MASK); 30 29 } 31 30 32 inline void gc_conditional_collect()31 static inline void gc_conditional_collect() 33 32 { 34 33 if(gc_needs_collect(gc_get_state()))
Note: See TracChangeset
for help on using the changeset viewer.