morecore vs sbrk

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

morecore vs sbrk

Post by Candy »

When using relocatable shared libraries, does it offer any true advantage to have morecore instead of sbrk?
Schol-R-LEA

Re:morecore vs sbrk

Post by Schol-R-LEA »

In your own OS? That depends on how you write them, and how your kernel allocates application memory. Since (AFAICT) neither of them are defined by the POSIX Standard (the man page for sbrk() states that "brk and sbrk are not defined in the C Standard and are deliberately excluded from the POSIX.1 standard"), you have no real need to support either function at all.
Post Reply