Question: is malloc a system call?
Answer: malloc is not a system call. It is implemented in libc and uses brk()/sbrk() and mmap() system call. Refer to Advanced Memory Allocation for more details.