使用OpenBSD系统的malloc,realloc的和自由在我的计划 [英] Use OpenBSD's malloc, realloc and free in my program

查看:263
本文介绍了使用OpenBSD系统的malloc,realloc的和自由在我的计划的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用OpenBSD的实现的malloc,realloc的和自由的我的Debian Lenny的桌面上,而不是glibc的的。


  1. 他们是简单地替代降:他们将我的Linux桌面上运行


  2. 哪些文件(县),我需要和OpenBSD的包中包含他们?



解决方案

谷歌有自己的malloc替代库在
HTTP://$c$c.google.com/p/google -perftools /维基/ GooglePerformanceTools
与使用说明。他们说,所有你需要做的是在(标准版链接之前),使用它联系起来。

我不知道是否有什么特别之处Op​​enBSD的版本,将prevent这一点。如果是malloc和其他一些标准库的东西在一起,很可能比较困难,虽然。

I would like to use OpenBSD's implementation of malloc, realloc and free on my Debian lenny desktop rather than glibc's.

  1. Are they simply drop in replacements: will they work on my Linux desktop ?

  2. Which are the file(s) that I need and which OpenBSD package contains them ?

解决方案

Google has their own malloc replacement library at http://code.google.com/p/google-perftools/wiki/GooglePerformanceTools with instructions for using it. They say all you need to do is link it in (before the standard version is linked in) to use it.

I do not know if there is anything special about the OpenBSD version that would prevent this. If it is malloc and some other standard library stuff together it is likely more difficult, though.

这篇关于使用OpenBSD系统的malloc,realloc的和自由在我的计划的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆