mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Remove broken free check on temp allocator.
This commit is contained in:
@@ -88,8 +88,6 @@ fn void*! temp_allocator_function(Allocator* data, usz size, usz alignment, usz
|
|||||||
|
|
||||||
fn void! TempAllocator._free(TempAllocator* this, void* old_pointer) @local
|
fn void! TempAllocator._free(TempAllocator* this, void* old_pointer) @local
|
||||||
{
|
{
|
||||||
// TODO fix free
|
|
||||||
assert((uptr)old_pointer >= (uptr)&this.data, "Pointer originates from a different allocator.");
|
|
||||||
usz old_size = *(usz*)(old_pointer - DEFAULT_SIZE_PREFIX);
|
usz old_size = *(usz*)(old_pointer - DEFAULT_SIZE_PREFIX);
|
||||||
if (old_pointer + old_size == &this.data[this.used])
|
if (old_pointer + old_size == &this.data[this.used])
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user