hoshi-lang dev
Yet another programming language
Loading...
Searching...
No Matches
memory.cpp File Reference
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <mimalloc/include/mimalloc.h>
#include <runtime/build_config.h>
#include "memory.h"
#include "runtime/rtti/rtti.h"
Include dependency graph for memory.cpp:

Go to the source code of this file.

Functions

void * runtime_object_alloc_report (size_t size, void *object)
 
void runtime_finalize_object_report (YoiObject *object)
 
void runtime_finalize_object (YoiObject *object)
 
void * runtime_object_alloc (unsigned long size)
 
YoiIntegerObjectruntime_get_string_array_data_pointer (YoiObjectArray *array)
 
void * runtime_exec_permit_alloc (unsigned long size)
 
void runtime_exec_permit_free (void *ptr)
 

Function Documentation

◆ runtime_exec_permit_alloc()

void * runtime_exec_permit_alloc ( unsigned long  size)

Definition at line 123 of file memory.cpp.

◆ runtime_exec_permit_free()

void runtime_exec_permit_free ( void *  ptr)

Definition at line 154 of file memory.cpp.

◆ runtime_finalize_object()

◆ runtime_finalize_object_report()

void runtime_finalize_object_report ( YoiObject object)

Definition at line 65 of file memory.cpp.

References hperf_report_mem_free(), AllocatedMemoryList::next, AllocatedMemoryList::prev, rtti_table, YoiObject::type_id, and YoiTypeInfo::type_name.

Referenced by runtime_finalize_object().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ runtime_get_string_array_data_pointer()

YoiIntegerObject * runtime_get_string_array_data_pointer ( YoiObjectArray array)

Definition at line 102 of file memory.cpp.

References YoiObjectArray::data, YoiObjectArray::gc_refcount, YoiIntegerObject::gc_refcount, runtime_finalize_object(), and runtime_object_alloc().

Here is the call graph for this function:

◆ runtime_object_alloc()

◆ runtime_object_alloc_report()

void * runtime_object_alloc_report ( size_t  size,
void *  object 
)

Definition at line 37 of file memory.cpp.

References hperf_report_mem_alloc(), AllocatedMemoryList::memory, AllocatedMemoryList::next, AllocatedMemoryList::prev, and AllocatedMemoryList::size.

Referenced by runtime_object_alloc().

Here is the call graph for this function:
Here is the caller graph for this function: