diff options
author | Steven Le Rouzic <steven.lerouzic@gmail.com> | 2024-12-27 19:19:40 +0100 |
---|---|---|
committer | Steven Le Rouzic <steven.lerouzic@gmail.com> | 2024-12-28 12:53:01 +0100 |
commit | 5642cba31b5f7610eddf552b1acd984cf718340d (patch) | |
tree | 40dcec36191f4ed8040c6b6f7525cee978b18fa1 /asl/allocator.cpp | |
parent | 006a09335306da53f32b4662ebc77866427b6841 (diff) |
Rework some metaprogramming stuff
Diffstat (limited to 'asl/allocator.cpp')
-rw-r--r-- | asl/allocator.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/asl/allocator.cpp b/asl/allocator.cpp index 7479bd7..645dd22 100644 --- a/asl/allocator.cpp +++ b/asl/allocator.cpp @@ -2,6 +2,7 @@ #include "asl/assert.hpp"
#include "asl/utility.hpp"
#include "asl/memory.hpp"
+#include "asl/print.hpp"
#include <cstdlib>
@@ -40,6 +41,7 @@ void* asl::GlobalHeap::realloc(void* old_ptr, [[maybe_unused]] const layout& old void* new_ptr = alloc(new_layout);
asl::memcpy(new_ptr, old_ptr, asl::min(old_layout.size, new_layout.size));
+ dealloc(old_ptr, old_layout);
return new_ptr;
#endif
}
|