#include <gc_ptr.h>
|
void * | start () noexcept |
|
void * | end () noexcept |
|
|
template<class T > |
class | make_gc |
|
class | gc_base_ptr |
|
void | gc_collect () |
|
GC memory control object. All allocations are handled via gc_object and C++ objects are constructed within them
gc_object::gc_object |
( |
void * |
e, |
|
|
void(*)(void *, void *) |
d |
|
) |
| |
|
noexcept |
constructor
- Parameters
-
[in] | e | |
[in] | d | destructor callback |
gc_object::~gc_object |
( |
| ) |
|
determine the end address of the last contaned C++ object belonging to this allocation
- Returns
- end address after last contained object.
void* gc_object::start |
( |
| ) |
|
|
inlineprotectednoexcept |
determine the start address of the first contained C++ object belonging to this allocation: It starts after the control information contained in gc_object, i.e. the layout in memory is as follows: <gc_obj><C++ object>[<C++ object> ....]
- Returns
- start address of first contained object.
manually trigger garbage collection. Normally this is not required as the collection starts automatically. It may be useful in low-memory situations to force a garbage collection.
void(* gc_object::destructor) (void *s, void *e) |
|
protected |
destructor callback that destructs the contained elements.
- Parameters
-
[in] | s | start address |
[in] | e | end addresses |
End of the memory range allocated by this object
pointer to first contained gc_ptr<> within this object
flag for mark-sweek algorithm
std::atomic<int> gc_object::root_ref_cnt |
|
protected |
number of pointers from the root set that point to this object
The documentation for this class was generated from the following file: