gdb:虚拟内存耗尽
我正在尝试在 Linux 上使用 gdb 调试应用程序。但是,当从我想要调试的共享库加载符号时,gdb 总是失败并显示错误:
gdb/utils.c:904: internal error: virtual memory exhausted: can't allocate 5592 bytes.
uname
显示所有参数的 unlimited
,包括 vmemory
。关于如何解决这个问题有什么想法吗?
I am trying to debug an application using gdb on Linux. However, when loading symbols from the shared library I want to debug, gdb always fails with the error:
gdb/utils.c:904: internal error: virtual memory exhausted: can't allocate 5592 bytes.
uname
shows unlimited
for all parameters including vmemory
. Any ideas on how to resolve this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
你使用什么版本的gdb?
gdb 中有一个旧错误可能会导致此问题:
http://sourceware.org /bugzilla/show_bug.cgi?id=9232
然而,它讨论的内存块大小比您收到的错误大得多。
另外,请通过 top 或 free 或 vmstat 检查实际可用空间有多少。
What version of gdb are you using?
There was an old bug in gdb which could cause this problem:
http://sourceware.org/bugzilla/show_bug.cgi?id=9232
It however talks about memory block of much larger size than for what you are getting the error.
Also, do check up how much how much actual free space is available through top or free or vmstat.
尝试使用:
这将使分配给用户的虚拟内存(通常是几kb:执行
ulimit -d
来知道该值)到无限kbTry using :
This will make virtual memory allocated to a user(usually few kb: do
ulimit -d
to know that value) to unlimited kb