📄 sb
字号:
@c ----------------------------------------------------------------------
@node sbrk, memory
@heading @code{sbrk}
@subheading Syntax
@example
#include <osfcn.h>
void *sbrk(int delta)
@end example
@subheading Description
This function changes the "break" of the program by adding @var{delta}
to it. This is the highest address that your program can access without
causing a violation. Since the heap is the region under the break, you
can expand the heap (where @code{malloc} gets memory from) by increasing
the break.
This function is normally accessed only bu @code{malloc} (@pxref{malloc}).
@subheading Return Value
The address of the first byte outside of the valid address range, or -1
if no more memory could be accessed.
@subheading Example
@example
char *buf;
buf = sbrk(1000); /* allocate space */
@end example
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -