mirror of
https://github.com/izzy2lost/wipeout-rewrite.git
synced 2026-07-06 00:20:05 -07:00
Fix 8 byte alignment in temp allocator; close #68
This commit is contained in:
@@ -46,7 +46,7 @@ void mem_reset(void *p) {
|
||||
// and aftewards free A then B.
|
||||
|
||||
void *mem_temp_alloc(uint32_t size) {
|
||||
size = ((size >> 3) + 7) << 3; // allign to 8 bytes
|
||||
size = ((size + 7) >> 3) << 3; // allign to 8 bytes
|
||||
|
||||
error_if(bump_len + temp_len + size >= MEM_HUNK_BYTES, "Failed to allocate %d bytes in temp mem", size);
|
||||
error_if(temp_objects_len >= MEM_TEMP_OBJECTS_MAX, "MEM_TEMP_OBJECTS_MAX reached");
|
||||
|
||||
Reference in New Issue
Block a user