mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-04 22:58:46 +00:00
Merge pull request #3497 from laytan/fix-buddy-allocator-wrong-query-info
fix: buddy allocator wrong query info pointer
This commit is contained in:
@@ -1124,7 +1124,7 @@ buddy_allocator_proc :: proc(allocator_data: rawptr, mode: Allocator_Mode,
|
|||||||
case .Query_Info:
|
case .Query_Info:
|
||||||
info := (^Allocator_Query_Info)(old_memory)
|
info := (^Allocator_Query_Info)(old_memory)
|
||||||
if info != nil && info.pointer != nil {
|
if info != nil && info.pointer != nil {
|
||||||
ptr := old_memory
|
ptr := info.pointer
|
||||||
if !(b.head <= ptr && ptr <= b.tail) {
|
if !(b.head <= ptr && ptr <= b.tail) {
|
||||||
return nil, .Invalid_Pointer
|
return nil, .Invalid_Pointer
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user