Page MenuHomeFreeBSD

only update blist cursor after successful allocation
ClosedPublic

Authored by dougm on May 6 2019, 10:02 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Aug 14, 3:22 PM
Unknown Object (File)
Thu, Aug 14, 9:53 AM
Unknown Object (File)
Thu, Aug 14, 4:11 AM
Unknown Object (File)
Sun, Jul 27, 5:21 PM
Unknown Object (File)
Sun, Jul 27, 12:57 PM
Unknown Object (File)
Sun, Jul 27, 1:34 AM
Unknown Object (File)
Jul 20 2025, 12:43 AM
Unknown Object (File)
Jul 14 2025, 4:48 AM
Subscribers

Details

Summary

The intention of the cursor is for the search for free blocks to resume where the last search left off. Suppose that there are no free blocks of size 32, but plenty of size 16. If we repeatedly request size 32 blocks, fail, and retry with size 16 blocks, then the failures all reset the cursor to the beginning of memory, making the 16 block allocation use a first fit, rather than next fit, strategy.

This change has blist_alloc make a copy of the cursor for its own decision making, and only updates the real blist cursor after a successful allocation, making those 16 block searches behave like next-fit searches.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped