Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Having separate special parts of the address space for "heap" and "stack" is a weird anachronism anyway. We use mmap for stacks for anything but the main thread, and many heap implementations (e.g. jemalloc, OpenBSD malloc) just use mmap for the heap too.

If I had my way, we'd use mmap for literally all memory allocation in a process and get rid of sbrk() and the stack segment entirely. There's nothing intrinsic about these legacy affordances.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: