dmalloc doesn't show log when a program compiled with pthread
来源:互联网 发布:sql between 编辑:程序博客网 时间:2024/06/06 12:57
Recently I have tried to implement a program to manage my system services. In fact, this is a server-side program, I want it to be a multiple thread program to process multiple requests from client. This program has too many malloc/calloc and free, so I used dmalloc to help to find the unfreed memory. The latest dmalloc version is 5.5.2. Both my Ubuntu and Embedded System use dmalloc-5.5.2. But a weired scenario happens in my Embedded System. It has no log printed. Why the same version dmalloc has different result? Then I compared the dmalloc.h between Ubuntu 13.04 with my Embedded System. They are different, so I think the dmalloc in Ubuntu should have been fixed with a patch. But I don't know where to get the patch? Then I tried to read the pdf file "dmalloc.pdf", which you can find in dmalloc package. Finally, I find a solution from the document. I invokedmalloc_shutdown() in my program before it exit. Then the log file shows.Note, this scenario only happens when compiled with -lpthread, even if you don't use it actually!
- dmalloc doesn't show log when a program compiled with pthread
- 'Icon already includes gloss effects' doesn't work on iOS 6 compiled on xCode 5 with SDK 7
- 'Storyboard doesn't contain a view controller with identifier 'fourth''
- Storyboard doesn't contain a view controller with identifier 'UIViewController'
- doesn't contain a view controller with identifier '''
- 'Storyboard doesn't contain a view controller with identifier '**ViewController'
- LESSON: Why Eclipse doesn't show SVN updates information with Subversive Plugin
- show a MessageBox with a "Don't show this message again"-Checkbox?
- mysqldump: Got error: 1556: You can't use locks with log tables. when doing LOCK TABLES
- Storyboard (<UIStoryboard: 0x15e989a0>) doesn't contain a view controller with identifier "***C"
- toryboard (<UIStoryboard: 0x17406dc00>) doesn't contain a view controller with identifier 'UIViewCon
- ios7下 attempting to set a swipe to delete cell when we already have one.... that doesn't seem good
- Makefile: ifeq directive doesn't work with $*
- error:'a' doesn't name a type
- What if Eclipse doesn't show support methods automatically?
- rpmdb: Program version 4.2 doesn’t match environment version
- rpm出错:Program version 4.3 doesn’t match environment version
- How to do when Campus Network doesn't support mentohust
- Spring的AOP思想研究和实现
- 浮点运算转换成整数运算
- 记事本使用技巧
- IOS网络编程(一)
- spring配置文件在打包使用时找到不路径问题
- dmalloc doesn't show log when a program compiled with pthread
- Windows下如何查看被占用的端口号及如何释放进程
- Source Insight使用教程
- WIN7安装SQL和VS出错的总结
- 字符串匹配——有限自动机
- Android TextView 一些字体颜色、大小设置属性
- iphone ios 中监听、KVO、观察和通知的五种方法
- linux C库编译
- 磁盘管理之查看磁盘信息