MeixnerGC
1.0
|
#include <mutex>
#include <vector>
#include <cstddef>
#include <atomic>
Go to the source code of this file.
Classes | |
class | gc_object |
class | gc_base_ptr |
class | gc_ptr< T > |
class | make_gc< T > |
class | make_gc< T[]> |
Functions | |
void | gc_collect () |
template<class T , class U > | |
bool | operator== (const gc_ptr< T > &lhs, const gc_ptr< U > &rhs) noexcept |
template<class T > | |
bool | operator== (const gc_ptr< T > &lhs, nullptr_t n) noexcept |
template<class T > | |
bool | operator== (nullptr_t n, const gc_ptr< T > &rhs) noexcept |
template<class T , class U > | |
bool | operator!= (const gc_ptr< T > &lhs, const gc_ptr< U > &rhs) noexcept |
template<class T > | |
bool | operator!= (const gc_ptr< T > &lhs, nullptr_t n) noexcept |
template<class T > | |
bool | operator!= (nullptr_t n, const gc_ptr< T > &rhs) noexcept |
template<class T , class U > | |
bool | operator< (const gc_ptr< T > &lhs, const gc_ptr< U > &rhs) noexcept |
template<class T > | |
bool | operator< (const gc_ptr< T > &lhs, nullptr_t n) noexcept |
template<class T > | |
bool | operator< (nullptr_t n, const gc_ptr< T > &rhs) noexcept |
template<class T > | |
bool | operator<= (const gc_ptr< T > &lhs, const gc_ptr< T > &rhs) noexcept |
template<class T > | |
bool | operator<= (const gc_ptr< T > &lhs, nullptr_t n) noexcept |
template<class T > | |
bool | operator<= (nullptr_t n, const gc_ptr< T > &rhs) noexcept |
template<class T > | |
bool | operator> (const gc_ptr< T > &lhs, const gc_ptr< T > &rhs) noexcept |
template<class T > | |
bool | operator> (const gc_ptr< T > &lhs, nullptr_t n) noexcept |
template<class T > | |
bool | operator> (nullptr_t n, const gc_ptr< T > &rhs) noexcept |
template<class T > | |
bool | operator>= (const gc_ptr< T > &lhs, const gc_ptr< T > &rhs) noexcept |
template<class T > | |
bool | operator>= (const gc_ptr< T > &lhs, nullptr_t n) noexcept |
template<class T > | |
bool | operator>= (nullptr_t n, const gc_ptr< T > &rhs) noexcept |
template<class T , class U > | |
gc_ptr< T > | operator+ (const gc_ptr< T > &a, const U &b) noexcept |
template<class T , class U > | |
gc_ptr< T > | operator+ (const U &a, const gc_ptr< T > &b) noexcept |
template<class T , class U > | |
gc_ptr< T > | operator- (const gc_ptr< T > &a, const U &b) noexcept |
template<class T > | |
auto | operator- (const gc_ptr< T > &a, const gc_ptr< T > &b) noexcept-> decltype(a.get()-b.get()) |
template<class T , class U > | |
gc_ptr< T > | static_pointer_cast (const gc_ptr< U > &p) noexcept |
template<class T , class U > | |
gc_ptr< T > | dynamic_pointer_cast (const gc_ptr< U > &p) noexcept |
template<class T , class U > | |
gc_ptr< T > | const_pointer_cast (const gc_ptr< U > &p) noexcept |
template<class T , class U > | |
gc_ptr< T > | reinterpret_pointer_cast (const gc_ptr< U > &p) noexcept |
template<class T , class U > | |
gc_ptr< T > | pointer_cast (const gc_ptr< U > &p) noexcept |
Variables | |
std::mutex | gc_mutex |
thread_local gc_object * | current |
std::vector< gc_object * > | all_objects |
long | gc_counter |
void gc_collect | ( | ) |
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.
|
noexcept |
compare pointers
[in] | lhs | first pointer |
[in] | rhs | second pointer |
|
noexcept |
compare pointers
[in] | lhs | first pointer |
[in] | n | nullptr |
|
noexcept |
compare pointers
[in] | n | nullptr |
[in] | rhs | second pointer |
pointer arithmetic
[in] | a | pointer |
[in] | b | integer type |
pointer arithmetic
[in] | a | integer type |
[in] | b | pointer |
pointer arithmetic
[in] | a | pointer |
[in] | b | integer type |
|
noexcept |
pointer arithmetic
[in] | a | pointer |
[in] | b | pointer |
|
noexcept |
compare pointers
[in] | lhs | first pointer |
[in] | rhs | second pointer |
|
noexcept |
compare pointers
[in] | lhs | first pointer |
[in] | n | nullptr |
|
noexcept |
compare pointers
[in] | n | nullptr |
[in] | rhs | second pointer |
compare pointers
[in] | lhs | first pointer |
[in] | rhs | second pointer |
|
noexcept |
compare pointers
[in] | lhs | first pointer |
[in] | n | nullptr |
|
noexcept |
compare pointers
[in] | n | nullptr |
[in] | rhs | second pointer |
|
noexcept |
compare pointers
[in] | lhs | first pointer |
[in] | rhs | second pointer |
|
noexcept |
compare pointers
[in] | lhs | first pointer |
[in] | n | nullptr |
|
noexcept |
compare pointers
[in] | n | nullptr |
[in] | rhs | second pointer |
compare pointers
[in] | lhs | first pointer |
[in] | rhs | second pointer |
|
noexcept |
compare pointers
[in] | lhs | first pointer |
[in] | n | nullptr |
|
noexcept |
compare pointers
[in] | n | nullptr |
[in] | rhs | second pointer |
compare pointers
[in] | lhs | first pointer |
[in] | rhs | second pointer |
|
noexcept |
compare pointers
[in] | lhs | first pointer |
[in] | n | nullptr |
|
noexcept |
compare pointers
[in] | n | nullptr |
[in] | rhs | second pointer |
std::vector<gc_object *> all_objects |
array containing all allocated objects
thread_local gc_object* current |
pointer to current object under construction in current thread
long gc_counter |
when this counter reaches 0, the garbage collection is triggered
std::mutex gc_mutex |
global mutex