简体   繁体   中英

gdb: virtual memory exhausted

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?

Try using :

ulimit -d unlimited

This will make virtual memory allocated to a user(usually few kb: do ulimit -d to know that value) to unlimited kb

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM