Classes | |
| class | dynamic::gc::garbage_collector |
| The interface to the garbage collector. More... | |
| class | dynamic::gc::gc_object |
| Any object managed by the garbage collector. More... | |
| class | dynamic::gc::root_ref< T > |
| Used to manage an object which is a root variable. More... | |
| class | dynamic::internal::leave_apartment |
| Use to temporarily release an apartment (for a wait operation etc). More... | |
| class | dynamic::internal::use_new_apartment |
| Creates a new apartment and sets the current apartment to be the new apartment. More... | |
| class | dynamic::kingsley_heap |
| Implements a Kingsley allocator. More... | |
| struct | dynamic::allocator< T > |
| An allocator which allocates memory in the local heap. More... | |
| union | cg::max_aligned |
| A data structure with maximum alignment. More... | |
| class | dynamic::internal::variant< Base, Bytes > |
| A class used to implement a variant. More... | |
| class | dynamic::api::atomic_counter |
| An atomic (threadsafe) integer which supports ++ and --. More... | |
| class | dynamic::apartment |
| A mutually exclusive garbage-collected heap. More... | |
| class | dynamic::types::proxy_impl |
| Implements a proxy - which is a controlled way of accessing a var in another apartment. More... | |
Functions | |
| DYNAMIC_API garbage_collector & | dynamic::gc::global_gc () |
| Accesses the garbage collector singleton. | |
| garbage_collector * | dynamic::gc::create_gc () |
| Creates a new garbage collector. | |
| DYNAMIC_API void | dynamic::gc_enable () |
| Temporarily disable the GC (can be nested). | |
| DYNAMIC_API void | dynamic::gc_disable () |
| Reenable the GC. | |
| DYNAMIC_API void | dynamic::gc_hint_collect () |
| Advise to perform a collection now (may not do anything) - put this into an idle loop. | |
| DYNAMIC_API void | dynamic::gc_force_collect () |
| Perform a collection now (inadvisible). | |
| DYNAMIC_API void | dynamic::gc_tune (int heap_factor=30, int idle_factor=20, int min_objects=1000) |
| Wait until the heap has grown by a factor of 3 before automatically performing a GC. | |
| dynamic::gc::garbage_collector * dynamic::gc::create_gc | ( | ) |
| void dynamic::gc_disable | ( | ) |
Reenable the GC.
Definition at line 277 of file gc.cpp.
References dynamic::gc::garbage_collector::disable(), and dynamic::gc::global_gc().
Referenced by test_gc().
| void dynamic::gc_enable | ( | ) |
Temporarily disable the GC (can be nested).
Definition at line 282 of file gc.cpp.
References dynamic::gc::garbage_collector::enable(), and dynamic::gc::global_gc().
Referenced by test_gc().
| void dynamic::gc_force_collect | ( | ) |
Perform a collection now (inadvisible).
Definition at line 271 of file gc.cpp.
References dynamic::gc::garbage_collector::collect(), and dynamic::gc::global_gc().
Referenced by test_files(), test_gc(), and test_proxy().
| void dynamic::gc_hint_collect | ( | ) |
Advise to perform a collection now (may not do anything) - put this into an idle loop.
Definition at line 265 of file gc.cpp.
References dynamic::gc::global_gc(), and dynamic::gc::garbage_collector::try_idle_gc().
Referenced by test_gc().
| void dynamic::gc_tune | ( | int | heap_factor = 30, |
|
| int | idle_factor = 20, |
|||
| int | min_objects = 1000 | |||
| ) |
Wait until the heap has grown by a factor of 3 before automatically performing a GC.
Wait until the heap has grown by a factor of 2 before gc_collect() actually collects garbage At least 1000 collectible objects must be allocated before collect_garbage() does anything.
Definition at line 287 of file gc.cpp.
References dynamic::gc::global_gc(), dynamic::gc::garbage_collector::set_gc_factor(), dynamic::gc::garbage_collector::set_idle_gc_factor(), and dynamic::gc::garbage_collector::set_min_objects().
| dynamic::gc::garbage_collector & dynamic::gc::global_gc | ( | ) |
Accesses the garbage collector singleton.
There might be more than one garbage collector so this returns the one currently in scope.
Definition at line 1735 of file proxy.cpp.
References dynamic::apartment::current(), and dynamic::apartment::gc().
Referenced by dynamic::gc_disable(), dynamic::gc_enable(), dynamic::gc_force_collect(), dynamic::gc_hint_collect(), dynamic::gc_tune(), dynamic::gc::gc_object::link(), and test_gc().
1.5.7.1