📄 al
字号:
@c ----------------------------------------------------------------------
@node alloca, memory
@heading @code{alloca}
@subheading Syntax
@example
#include <stdlib.h>
void *alloca(int size);
@end example
@subheading Description
This function is similar to @xref{malloc}. The difference is that the
memory allocated is in the current stack frame, so when the current
function exits the memory is automatically reclaimed. You should
never call @code{free()} with a pointer returned by @code{alloca}.
@subheading Return Value
A pointer to the temporary memory.
@subheading Example
@example
char *x = alloca(20+strlen(y));
sprintf(x, "The value is %s", y);
return strdup(x);
@end example
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -