I am new to UNIX, and I am studying some of UNIX system calls such as brk()
, sbrk()
, and so on....
Last day I have read about malloc()
malloc() function is used to call the sbrk system call to create a memory dynamically during the process.
malloc() function is already assigned in stdlib.h header file so the as per the required function is recursively call by the malloc function using the library function.
with the help of sbrk we need to explicitly declare some thing to call the system call.
According to the size given in function or through system call it return to the variable and store.