test15.c

来自「很好用的内存泄漏检测工具。要配合linux的gcc使用,安装后将你的编译器gcc」· C语言 代码 · 共 20 行

C
20
字号
/* Tester for yamd. */#define _GNU_SOURCE#include <stdlib.h>#ifdef __GNU_LIBRARY__#include <malloc.h>char msg[] = "memalign overrun (should complain)";void test(void){  char *p;  p = memalign(4096, 1);  p[3] = 'X';}#elsechar msg[] = "Test of memalign, which you don't have (does nothing)";void test(void) {}#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?