Skip to content

Unify brk()/sbrk() #331

@rennergade

Description

@rennergade

via: https://man7.org/linux/man-pages/man2/sbrk.2.html

   On Linux, sbrk() is implemented as a library function that uses
   the brk() system call, and does some internal bookkeeping so that
   it can return the old break value.

We currently implement brk and sbrk as separate syscalls though it seems like sbrk should be a wrapper. I'm not sure how trivial this is to refactor with our current implementation but it makes us use an additional syscall number that Linux doesn't have. If we could unify this in libc it would make our lives easier.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions