Remix.run Logo
p_ing 3 days ago

Reread my comment. Yes, macOS (or ARM, here) wastes memory. For every 1KiB page you have, you're wasting 15KiB of memory.

That's just how this works. It's a performance vs. efficiency tradeoff.

And there's nothing special about your workload. It's small in comparison to many others that many other OSes on many other ISAs, including Windows & x86 w/ AWE, have been running for quite some time with no issue.

tredre3 2 days ago | parent [-]

> For every 1KiB page you have, you're wasting 15KiB of memory.

Applications do not allocate memory through the kernel, though. There's a layer between the application code and the kernel, usually the libc or equivalent, that takes the page and fills it with smaller allocations. And most allocators out there usually request pretty big chunks at a time too, measured in megabytes/hundreds of pages.

So what you are saying might be technically true if you were to dispatch all mallocs to the kernel, it is not actually true in the real world.