Skip to content

Commit

Permalink
Fix tlsf block adjustment
Browse files Browse the repository at this point in the history
  • Loading branch information
Lperlind committed Feb 10, 2025
1 parent 40cf9a3 commit 88a5817
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 88a5817

Please # to comment.