tst_free.c
来自「KEILC51程序实例和配套硬件目标板,很详细,程序有注释」· C语言 代码 · 共 15 行
C
15 行
#include <stdlib.h>
#include <stdio.h> /* for printf */
void tst_free (void) {
void * mbuf;
printf ("Allocating memory\n");
mbuf = malloc (1000);
if (mbuf == NULL) {
printf ("Unable to allocate memory\n");
}
else {
free (mbuf);
printf ("Memory free\n");
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?