xr
来自「Algorithms for Image Processing and Comp」· 代码 · 共 28 行
TXT
28 行
@c ----------------------------------------------------------------------
@node xrealloc, memory
@heading @code{xrealloc}
@subheading Syntax
@example
void *xrealloc(void *ptr, size_t size);
@end example
@subheading Description
This function is just like @code{realloc} (@pxref{realloc}), except that
if there is no more memory, it prints an error message and exits. It
can also properly handle @var{ptr} being @code{NULL}.
@subheading Return Value
A pointer to a possibly new block.
@subheading Example
@example
char *buf;
buf = (char *)xrealloc(buf, new_size);
@end example
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?