Page MenuHomeFreeBSD

Remove remnants of optimization for > pagesize allocations.
ClosedPublic

Authored by brooks on Aug 28 2019, 3:44 PM.
Tags
None
Referenced Files
Unknown Object (File)
Apr 25 2024, 11:29 PM
Unknown Object (File)
Apr 25 2024, 11:28 PM
Unknown Object (File)
Apr 25 2024, 11:28 PM
Unknown Object (File)
Apr 25 2024, 6:00 PM
Unknown Object (File)
Apr 25 2024, 2:44 PM
Unknown Object (File)
Mar 7 2024, 11:40 PM
Unknown Object (File)
Feb 23 2024, 4:39 PM
Unknown Object (File)
Feb 23 2024, 4:39 PM
Subscribers

Details

Summary

In the past, this allocator seems to have allocated things larger than
a page seperately. Much of this code was removed at some point (perhaps
along with sbrk() used) so remove the rest. Instead, keep allocating in
power-of-two bins up to FIRST_BUCKET_SIZE << (NBUCKETS - 1). If we want
something more efficent, we should use a fancier allocator.

While here, remove some vestages of sbrk() use. Most importantly, don't
try to page align the pagepool since it's always page aligned by mmap().

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 26159
Build 24674: arc lint + arc unit

Event Timeline

I've now booted on amd64 in addition to CheriBSD.

libexec/rtld-elf/rtld_malloc.c
135

isn't it make sense to include bucket < NBUCKETS into the condition where we return NULL ? I think it is better to use this condition instead of waiting for amt overflow.

180

This seems to be a dead check now ?

  • Remove dead check.
  • Return immediatly from the loop if bucket gets to big.
This revision is now accepted and ready to land.Aug 30 2019, 8:18 AM