Search code examples
cmemory-managementbrk

What is program break? Where does it start from,0x00?


int brk(void *end_data_segment);
void *sbrk(intptr_t increment);

Calling sbrk() with an increment of 0 can be used to find the current location of the program break.

What is program break? Where does it start from,0x00?


Solution

  • A program break is end of the process's data segment. AKA...

    the program break is the first location after the end of the uninitialized data segment

    As to where it starts from, it's system dependent but probably not 0x00.