Skip to content

Conversation

@writegsqword
Copy link

@writegsqword writegsqword commented Nov 22, 2025

In the previous line the comment says this:
"We only do this for sizes larger than 1024 bytes. In other words we can live with some wasted space in zones that manage chunks smaller than ZONE_1024"

I believe the intent here is as follows:

  1. For chunks larger than 1024, check if too much space is wasted. If the wasted space is "not acceptable", this zone is not available for serving this particular allocation.
  2. For chunks smaller or equal to 1024, if the zone is also less than less than or equal to 1024(and obviously, fits the allocation), then use that zone.

However, the code does this in effect:

  1. For chunks larger than 1024, check if too much space is wasted. If the wasted space is "not acceptable", this zone is not available for serving this particular allocation(as intended).
  2. For chunks smaller or equal to 1024, the zone is ALWAYS VALID(if it has empty slots of course).

This causes a huge amount of wasted space when only a large zone is available for allocation, and small allocation requests are served.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant