#12438: Implement brk and sbrk
----------------------------+----------------------------
Reporter: simonsouth | Owner: nobody
Type: enhancement | Status: closed
Priority: normal | Milestone: Unscheduled
Component: System/POSIX | Version: R1/Development
Resolution: fixed | Keywords:
Blocked By: | Blocking:
Has a Patch: 0 | Platform: All
----------------------------+----------------------------
Comment (by axeld):
I'm basically okay with the patch, but I have two questions:
1) If only libroot/libgcc will use malloc(), but the app uses sbrk(), what
exactly will happen with your patch? It does look like the two will
interfere now more than before in that use case. Can't we just allocate
the heap as before to avoid this?
2) I would actually move the non program base even further down, ie. like
1.5 GB in order to make more space for the heap (or sbrk). If that 512 MB
isn't enough, it will be placed somewhere else, anyway, right? We could
also add some affinity flag, ie. if an area should rather be created at
the start or the end of virtual memory to keep the space for the heap as
large as possible.
--
Ticket URL: <https://dev.haiku-os.org/ticket/12438#comment:13>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.