GC

@extern
object GC

The Boehm GC conservative garbage collector

See also:
class Object
trait Matchable
class Any
GC.type

Type members

Value members

Concrete methods

@name("scalanative_GC_CreateThread")
def CreateThread(threadAttributes: Ptr[CStruct3[CUnsignedInt, CVoidPtr, Boolean]], stackSize: CSize, startRoutine: ThreadStartRoutine, routineArg: ThreadRoutineArg, creationFlags: CUnsignedInt, threadId: Ptr[CUnsignedInt]): CVoidPtr

Proxy to CreateThread which registers created thread in the GC

Proxy to CreateThread which registers created thread in the GC

@name("scalanative_GC_add_roots")
def addRoots(addressLow: CVoidPtr, addressHigh: CVoidPtr): Unit

Notify the Garbage Collector about the range of memory which should be scanned when marking the objects. The range should contain only memory NOT allocated using the GC, eg. using malloc. Otherwise it might lead to the undefined behaviour at runtime.

Notify the Garbage Collector about the range of memory which should be scanned when marking the objects. The range should contain only memory NOT allocated using the GC, eg. using malloc. Otherwise it might lead to the undefined behaviour at runtime.

Value parameters:
addressHigh

End of the range including the last address that should be scanned when marking

addressLow

Start of the range including the first address that should be scanned when marking

@name("scalanative_GC_get_init_heapsize")
@name("scalanative_GC_get_max_heapsize")
@name("scalanative_GC_stats_collection_duration_total")
@name("scalanative_GC_stats_collection_total")
@name("scalanative_GC_get_used_heapsize")
@name("scalanative_GC_pthread_create")

Proxy to pthread_create which registers created thread in the GC

Proxy to pthread_create which registers created thread in the GC

@name("scalanative_GC_remove_roots")
def removeRoots(addressLow: CVoidPtr, addressHigh: CVoidPtr): Unit

Notify the Garbage Collector about the range of memory which should no longer should be scanned when marking the objects. Every previously registered range of addressed using addRoots which is fully contained withen the range of addressLow and addressHigh would be exluded from the subsequent scanning during the GC. It is safe to pass a range of addressed which doen't match any of the previously registered memory regions.

Notify the Garbage Collector about the range of memory which should no longer should be scanned when marking the objects. Every previously registered range of addressed using addRoots which is fully contained withen the range of addressLow and addressHigh would be exluded from the subsequent scanning during the GC. It is safe to pass a range of addressed which doen't match any of the previously registered memory regions.

Value parameters:
addressHigh

End of the range including the last address that should be scanned when marking

addressLow

Start of the range including the first address that should be scanned when marking