#allocator
1 piece tagged allocator.
-
A Heap Without a Tail: A TLSF Allocator for VaiOS, and Teaching QEMU to Measure It
VaiOS's heap is fast on average and resists fragmentation — but its malloc has a worst case that grows with the heap, and it runs with interrupts off, which makes it an interrupt-latency problem in disguise. I gave the kernel a second allocator — TLSF, O(1) in the worst case — behind a swappable backend interface, so either can be selected from config. Then I tried to measure the difference under QEMU and found the cycle counter was fake. This is how I made the measurement honest: a real time source from semihosting, and a deterministic metric that doesn't need one at all.