Skip to content
Advertisement

Tag: memory-management

What does the brk() system call do?

According to Linux programmers manual: brk() and sbrk() change the location of the program break, which defines the end of the process’s data segment. What does the data segment mean over here? Is it just the data segment or data, BSS, and heap combined? According to wiki Data segment: Sometimes the data, BSS, and heap areas are collectively referred to

mmap vs sbrk, performance comparison

Which of these calls is faster on average? I’ve heard that mmap is faster for smaller allocations but I haven’t heard a comparison of either. Any information on performance for these would be nice. Answer You should tag this with a particular implementation (like linux) since the answer surely varies by implementation. For now I’ll assume Linux since it’s the

Advertisement