Skip to content

Commit

Permalink
Merge pull request #4820 from Lperlind/tlsf_fixup
Browse files Browse the repository at this point in the history
Fix tlsf block adjustment
  • Loading branch information
Kelimion authored Feb 10, 2025
2 parents 40cf9a3 + 88a5817 commit bc100c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/mem/tlsf/tlsf_internal.odin
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit bc100c3

Please sign in to comment.