Changeset 200fcb3 for examples/gc_no_raii/src
- Timestamp:
- Dec 12, 2018, 9:16:12 AM (6 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
- Children:
- 5ebb1368
- Parents:
- 3d99498
- Location:
- examples/gc_no_raii/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
examples/gc_no_raii/src/internal/collector.c
r3d99498 r200fcb3 38 38 void* gc_allocate(size_t target_size) 39 39 { 40 // sout | "Allocating " | target_size | " bytes" | endl;40 // sout | "Allocating " | target_size | " bytes"; 41 41 42 42 size_t size = gc_compute_size(target_size + sizeof(gc_object_header)); 43 43 44 // sout | "Object header size: " | sizeof(gc_object_header) | " bytes" | endl;45 // sout | "Actual allocation size: " | size | " bytes" | endl;44 // sout | "Object header size: " | sizeof(gc_object_header) | " bytes"; 45 // sout | "Actual allocation size: " | size | " bytes"; 46 46 47 47 check(size < POOL_SIZE_BYTES); -
examples/gc_no_raii/src/internal/state.h
r3d99498 r200fcb3 38 38 static inline bool gc_needs_collect(gc_state* state) 39 39 { 40 // sout | "Used Space: " | state->used_space | " bytes" | endl;40 // sout | "Used Space: " | state->used_space | " bytes"; 41 41 return state->used_space * 2 > state->total_space; 42 42 } -
examples/gc_no_raii/src/tools/print.h
r3d99498 r200fcb3 5 5 // #include <fstream.hfa> 6 6 // 7 // #define DEBUG_OUT(x) sout | x | endl;7 // #define DEBUG_OUT(x) sout | x; 8 8 // 9 9 // #else
Note: See TracChangeset
for help on using the changeset viewer.