小编lim*_*lim的帖子

使用pthread_create时valgrind内存泄漏错误

我正在使用pthread库编写程序.当我用命令valgrind --leak-check = full运行我的程序时,我得到以下错误描述:

==11784==  
==11784== **HEAP SUMMARY:**  
==11784==     in use at exit: 4,952 bytes in 18 blocks  
==11784==   total heap usage: 1,059 allocs, 1,041 frees, 51,864 bytes allocated  
==11784==  
==11784== **288 bytes** in 1 blocks are possibly lost in loss record 2 of 3  
==11784==    at 0x4C2380C: calloc (vg_replace_malloc.c:467)  
==11784==    by 0x4010D2E: _dl_allocate_tls (dl-tls.c:300)  
==11784==    by 0x55DC218: **pthread_create**@@GLIBC_2.2.5 (allocatestack.c:570)  
==11784==    by 0x401BC0: initdevice(char*) (in /a/fr-01/vol/home/stud/lim/workspace  /Ex3/l)  
==11784==    by 0x406D05: main (in /a/fr-01/vol/home/stud/lim/workspace/Ex3/l)  
==11784==  
==11784== **4,608 bytes** in 16 blocks …
Run Code Online (Sandbox Code Playgroud)

c++ valgrind memory-leaks pthreads

20
推荐指数
3
解决办法
2万
查看次数

编译致命错误头文件g ++

我收到此编译错误:

fatal error: can’t create precompiled header f: Text file busy
compilation terminated.  
Run Code Online (Sandbox Code Playgroud)

这是一个非常神秘的,因为我偶尔会得到它...

我哪里出错了?

c++ compiler-errors g++

5
推荐指数
1
解决办法
2442
查看次数

标签 统计

c++ ×2

compiler-errors ×1

g++ ×1

memory-leaks ×1

pthreads ×1

valgrind ×1