Browse Source

fix: buddy allocator wrong query info pointer

Laytan Laats 1 year ago
parent
commit
0530f86a48
1 changed files with 1 additions and 1 deletions
  1. 1 1
      core/mem/allocators.odin

+ 1 - 1
core/mem/allocators.odin

@@ -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
 			}
 			}