How does sbrk() work in C++?
问题 Where can I read about sbrk() in some detail? How does it exactly work? In what situations would I want to use sbrk() instead of the cumbersome malloc() and new() ? btw, what is the expansion for sbrk() ? 回答1: Have a look at the specification for brk/sbrk. The call basically asks the OS to allocate some more memory for the application by incrementing the previous "break value" by a certain amount. This amount (the first parameter) is the amount of extra memory your application then gets. Most