mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-07 16:18:52 +00: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
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
n := bytes
|
n := align_formula(bytes, p.alignment)
|
||||||
extra := p.alignment - (n % p.alignment)
|
|
||||||
n += extra
|
|
||||||
if n > p.block_size {
|
if n > p.block_size {
|
||||||
return nil, .Invalid_Argument
|
return nil, .Invalid_Argument
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user