br
来自「Algorithms for Image Processing and Comp」· 代码 · 共 31 行
TXT
31 行
@c ----------------------------------------------------------------------
@node brk, memory
@heading @code{brk}
@subheading Syntax
@example
#include <stdlib.h>
int brk(void *ptr);
@end example
@subheading Description
This function changes the @emph{break} for the program. This is the
first address that, if referenced, will cause a fault to occur. The
program asks for more memory by specifying larger values for @var{ptr}.
Normally, this is done transparently through the @code{malloc} function.
@subheading Return Value
zero if the break was changed, -1 if not. @var{errno} is set to the
error.
@subheading Example
@example
if (brk(old_brk+1000))
printf("no memory\n");
@end example
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?