Closed 0152la closed 2 months ago
fight blocks
Harsh but fair? ;) I assume "find" might be more appropriate?
fight blocks
Harsh but fair? ;) I assume "find" might be more appropriate?
You're right. Want me to edit the PR text? Or copy that amended description somewhere else, i.e., in the code as a comment, or the commit message?
Please force push an update to the commit message.
The commit message is just
Implement a memory allocator which can
free
, rather than the simple bump allocator we had before.
Do you mean you'd prefer I update the commit message with the first message in this PR?
Ah, ignore me! It's fine as-is.
Implement a memory allocator which can
free
, rather than the simple bump allocator we had before.For each allocation, we additionally save the size of the allocation, and a pointer to the next allocation (an extra
sizeof(size_t) + sizeof(void*)
(or 16) bytes) in the preamble of the allocation. We can then use this to find how much to free, and to fight blocks large enough that fit future allocation (nothing too smart regarding compaction or fragmentation).Also prepare
init_test.py
, which sets the CI testing environment, for the addition of testlua_suite_some.c
(currently still broken).