mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-23 14:14:59 -07:00
Merge pull request #5596 from alessio98888/master
Fix buddy allocator assert
This commit is contained in:
@@ -2331,7 +2331,7 @@ buddy_allocator_alloc_bytes_non_zeroed :: proc(b: ^Buddy_Allocator, size: uint)
|
||||
}
|
||||
found.is_free = false
|
||||
data := ([^]byte)(found)[b.alignment:][:size]
|
||||
assert(cast(uintptr)raw_data(data)+cast(uintptr)size < cast(uintptr)buddy_block_next(found), "Buddy_Allocator has made an allocation which overlaps a block header.")
|
||||
assert(cast(uintptr)raw_data(data)+cast(uintptr)(size-1) < cast(uintptr)buddy_block_next(found), "Buddy_Allocator has made an allocation which overlaps a block header.")
|
||||
// ensure_poisoned(data)
|
||||
// sanitizer.address_unpoison(data)
|
||||
return data, nil
|
||||
|
||||
Reference in New Issue
Block a user