浏览代码

mem: Don't print `Buddy_Allocator.tail`

This is always a pointer past the end of the buffer given to
`buddy_allocator_init`, which could be an invalid address. Printing may
result in a segmentation violation.
Feoramund 2 月之前
父节点
当前提交
bfa0e1110a
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      core/mem/allocators.odin

+ 1 - 1
core/mem/allocators.odin

@@ -2196,7 +2196,7 @@ The buddy allocator data.
 */
 */
 Buddy_Allocator :: struct {
 Buddy_Allocator :: struct {
 	head:      ^Buddy_Block,
 	head:      ^Buddy_Block,
-	tail:      ^Buddy_Block,
+	tail:      ^Buddy_Block `fmt:"-"`,
 	alignment: uint,
 	alignment: uint,
 }
 }