3 ms·
The (sarcastic) point was about the fact that no real world code actually relied on a malloc() of half the address space. I'm sure it "worked" in some sense, t
by ajross 7y ago
The (sarcastic) point was about the fact that no real world code actually relied on a malloc() of half the address space.
I'm sure it "worked" in some sense, though I'd be really surprised if you could make that happen with a default-linked C program on any distro that ever shipped. The holes just aren't big enough. You'd need to link the app with special care, and potentially write your own dynamic loader to keep the region you wanted free. And if you do that... you might as well just mmap() the thing.
The point was that doing this with the system heap on a 32 bit system was never a serious thing. There are apps that would do management of memory spaces that large, but they didn't do it with malloc.