mirror of
https://git.checksum.fail/alec/erythros
synced 2025-12-12 05:59:53 +02:00
System/Setup/Environment+FFI/LibC: Increase calloc/malloc mem_tasks
Give LibC malloc() and calloc() an array of 16 mem_tasks each, for now. We will probably be removing this, in favor of giving each non-HolyC library its own static memory pool, as we will do with stb_truetype.h in a forthcoming commit.
This commit is contained in:
@@ -12,8 +12,8 @@ U0 bcmp()
|
||||
|
||||
U64 @calloc(I64 size)
|
||||
{
|
||||
U64 res = CAlloc(size, malloc_mem_task[malloc_current_mem_task % MALLOC_MEM_TASK_COUNT]->code_heap);
|
||||
malloc_current_mem_task++;
|
||||
U64 res = CAlloc(size, calloc_mem_task[calloc_current_mem_task % CALLOC_MEM_TASK_COUNT]->code_heap);
|
||||
calloc_current_mem_task++;
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user