NDR: Implement and use doubly-linked lists for freeing up memory blocks

This commit is contained in:
Cacodemon345
2025-08-23 01:21:42 +06:00
parent 242d272c1a
commit ada50dade3
2 changed files with 84 additions and 8 deletions

View File

@@ -559,6 +559,10 @@ codegen_block_start_recompile(codeblock_t *block)
fatal("Recompile to used block!\n");
#endif
if (block->head_mem_block) {
codegen_allocator_free(block->head_mem_block);
block->head_mem_block = NULL;
}
block->head_mem_block = codegen_allocator_allocate(NULL, block_current);
block->data = codeblock_allocator_get_ptr(block->head_mem_block);