System calls

System calls provide interactions between userspace and the kernel.

Memory management

  • brk defines the end of a process's data segment, increasing or decreasing memory allocation.
  • sbrk increments the location of the program break, returning the previous break on success, thus incrementing by 0 yields the current location.

File management

  • stat gets file information.
  • statx is similar to stat, but can deal with network file systems.
  • sync() commits the filesystem cache to disk.
    • syncfs(int fd) commits the filesystem cache for the filesystem containing the specified file descriptor to disk.


  • ptrace initiates process tracing.