提交 f8ba2750 创建 作者: shx's avatar shx

提交作业

上级 54ee15c8
流水线 #153580 已失败 于阶段
用时 8 秒
......@@ -91,7 +91,7 @@
"label": "内存检测",
"type": "shell",
"windows": {
"command": "cat \"${execPath}.tips\\env_tip.txt\" ; echo VSCode安装路径-${execPath} ; echo 正在使用Dr.Memory检测内存 ; make ; cmd.exe /c \"drmemory -- .\\app.exe '<' input1.txt\""
"command": "cat \"${execPath}.tips\\env_tip.txt\" ; echo VSCode安装路径-${execPath} ; echo 正在使用Dr.Memory检测内存 ; make ; cmd.exe /c \"drmemory -ignore_kernel -leaks_only -brief -batch -- .\\app.exe '<' input1.txt\""
},
"linux": {
"command": "echo 正在使用 Valgrind 检测内存 && make && echo ***如果提示 /bin/bash: valgrind: command not found 可使用终端命令 sudo apt install valgrind 安装(需要连接互联网)*** && valgrind --leak-check=full ./app.exe < input1.txt"
......
......@@ -5,7 +5,7 @@ int main()
{
int x, y;
int *p = malloc(116);
int *p = malloc(8);
scanf("%d", &x);
......@@ -25,6 +25,8 @@ int main()
printf("x = %d, y = 3 * x - 11 = %d\n", x, y);
}
// free(p);
return 0;
}
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论