5#ifndef HOSHI_LANG_MEMORY_H
6#define HOSHI_LANG_MEMORY_H
74#ifdef ELYSIA_RUNTIME_BUILD_TYPE_DEBUG
77extern "C" void runtime_debug_print_current_allocated_memory();
80#if defined(ELYSIA_RUNTIME_ENABLE_BUILTIN_MEMORY_LEAK_DETECTOR)
81extern "C" int64_t runtime_object_allocated;
94#ifndef ELYSIA_DISABLE_MEMORY_EXECUTABLE_MAPPING_FEATURE
104#define GC_WRAPPER_IMPL(X, U) extern "C" void basic_##X##_gc_refcount_increase(U* obj) { \
105 obj->gc_refcount++; \
108extern "C" void basic_##X##_gc_refcount_decrease(U* obj) { \
109 obj->gc_refcount--; \
110 if (obj->gc_refcount <= 0) { \
111 runtime_finalize_object((YoiObject*)obj); \
116#define GC_WRAPPER_INLINE(X, U) static inline void basic_##X##_gc_refcount_increase(U* obj) { \
118 obj->gc_refcount++; \
121static inline void basic_##X##_gc_refcount_decrease(U* obj) { \
123 obj->gc_refcount--; \
124 if (obj->gc_refcount <= 0) { \
125 runtime_finalize_object((YoiObject*)obj); \
YoiIntegerObject * runtime_get_string_array_data_pointer(YoiObjectArray *array)
void * runtime_object_alloc(unsigned long size)
void runtime_finalize_object_report(YoiObject *object)
void runtime_exec_permit_free(void *ptr)
void runtime_finalize_object(YoiObject *object)
void * runtime_exec_permit_alloc(unsigned long size)
void * runtime_object_alloc_report(size_t size, void *object)
#define GC_WRAPPER_INLINE(X, U)
AllocatedMemoryList * prev
AllocatedMemoryList * next
unsigned long long gc_refcount
unsigned long long type_id
unsigned long long gc_refcount
unsigned long long type_id
unsigned long long gc_refcount
unsigned long long type_id
unsigned long long gc_refcount
unsigned long long type_id
unsigned long long gc_refcount
unsigned long long type_id
unsigned long long length
unsigned long long gc_refcount
unsigned long long type_id
unsigned long long gc_refcount
unsigned long long type_id
unsigned long long gc_refcount
unsigned long long type_id
unsigned long long gc_refcount
unsigned long long type_id