⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 al

📁 Algorithms for Image Processing and Computer Vision Source Code
💻
字号:
@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 + -