aboutsummaryrefslogtreecommitdiff
path: root/core/mem
diff options
context:
space:
mode:
authorLucas Perlind <perlindluca@gmail.com>2025-02-10 12:59:27 +1100
committerLucas Perlind <perlindluca@gmail.com>2025-02-10 13:01:16 +1100
commit88a5817134cf9c98e6bb519607c47ccb8472285e (patch)
treebfcd5097524a6ee6726d601a0cc9d722c9895cad /core/mem
parent40cf9a33e98f6815f0fdb09b2e5dab9feef72db8 (diff)
Fix tlsf block adjustment
Diffstat (limited to 'core/mem')
-rw-r--r--core/mem/tlsf/tlsf_internal.odin2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/mem/tlsf/tlsf_internal.odin b/core/mem/tlsf/tlsf_internal.odin
index cac151183..66141fcbb 100644
--- a/core/mem/tlsf/tlsf_internal.odin
+++ b/core/mem/tlsf/tlsf_internal.odin
@@ -260,7 +260,7 @@ adjust_request_size :: proc(size, align: uint) -> (adjusted: uint) {
// aligned size must not exceed `BLOCK_SIZE_MAX`, or we'll go out of bounds on `sl_bitmap`.
if aligned := align_up(size, align); aligned < BLOCK_SIZE_MAX {
- adjusted = min(aligned, BLOCK_SIZE_MAX)
+ adjusted = max(aligned, BLOCK_SIZE_MIN)
}
return
}