Commit Graph

7 Commits

Author SHA1 Message Date
Feoramund
4b08e8cfff Support getting page sizes at runtime 2025-05-11 14:29:58 -04:00
Feoramund
b8cf6aca8b Fix rebase glitch
The new address sanitizer code was committed to a file that I had later
moved and renamed with the old commits.

Having rebased onto master, those commits were carried on to the present
point without generating a conflict and have since become invalid.
2025-05-09 18:17:48 -04:00
Feoramund
674853f16c Remove heap coverage code in favor of external tooling 2025-05-09 18:15:22 -04:00
Feoramund
b056b9e130 Rewrite the heap allocator
This is a total rewrite after having experimented with a variety of
techniques including a dual-allocator strategy for small and large size
classes where the large class allocator had a coalescing mechanism.

This allocator design is much closer to `mimalloc` in spirit and
performs almost twice as fast as the original bitmap-based design.

Additionally, several bugs have been fixed. The most important one being
the lock-free synchronization method used for remote frees. This design
uses a single atomic pointer that is doubly-tagged to pass remote frees
either to the heap or to the slab, depending on the ownership status.
2025-05-09 17:56:36 -04:00
Feoramund
5e773aaf56 Adjust heap allocator benchmarks 2025-05-08 11:06:03 -04:00
Feoramund
17b38c1bca Strengthen Consume to Acquire in heap allocator 2025-05-08 11:06:01 -04:00
Feoramund
a4a776634c Add native heap allocator
- Add the test bench for the allocator
- Move old allocator code to the test bench
- Fix `heap_resize` usage in `os2/env_linux.odin` to fit new API
  requiring `old_size`
2025-05-08 11:06:00 -04:00