mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-12 14:21:25 -07:00
fix #3692 memory alignment bug in core:mem.dynamic_pool_alloc_bytes
This commit is contained in:
@@ -748,9 +748,7 @@ dynamic_pool_alloc_bytes :: proc(p: ^Dynamic_Pool, bytes: int) -> ([]byte, Alloc
|
||||
return
|
||||
}
|
||||
|
||||
n := bytes
|
||||
extra := p.alignment - (n % p.alignment)
|
||||
n += extra
|
||||
n := align_formula(bytes, p.alignment)
|
||||
if n > p.block_size {
|
||||
return nil, .Invalid_Argument
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user