aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen van Rijn <Kelimion@users.noreply.github.com>2025-02-10 03:12:20 +0100
committerGitHub <noreply@github.com>2025-02-10 03:12:20 +0100
commitbc100c315871e4f2733b72ea4267dafffbd4771f (patch)
treebfcd5097524a6ee6726d601a0cc9d722c9895cad
parent40cf9a33e98f6815f0fdb09b2e5dab9feef72db8 (diff)
parent88a5817134cf9c98e6bb519607c47ccb8472285e (diff)
Merge pull request #4820 from Lperlind/tlsf_fixup
Fix tlsf block adjustment
-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
}