When calling the sbrk routine several times, memory areas should be allocated in succession starting from lower addresses. If the memory area for allocation is insufficient, an error should occur. When allocation is successful, the address of the beginning of the allocated memory area should be returned; if unsuccessful, "(char *) -1" should be returned. |
If you wish to use the standard library function malloc, calloc, or realloc, or the C++ function new, allocate at least 16 bytes of memory. |
Normal: Start address of allocated memory
Error: (char *) -1