首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Valgrind内存不足

Valgrind内存不足
EN

Stack Overflow用户
提问于 2013-11-03 16:24:45
回答 1查看 2.6K关注 0票数 1

这是我在valgrind崩溃并停止分析我的应用程序时收到的消息:

代码语言:javascript
复制
    ==16317== 
    ==16317==     Valgrind's memory management: out of memory:
    ==16317==        newSuperblock's request for 4194304 bytes failed.
    ==16317==        3013349376 bytes have already been allocated.
    ==16317==     Valgrind cannot continue.  Sorry.
    ==16317== 
    ==16317==     There are several possible reasons for this.
    ==16317==     - You have some kind of memory limit in place.  Look at the
    ==16317==       output of 'ulimit -a'.  Is there a limit on the size of
    ==16317==       virtual memory or address space?
    ==16317==     - You have run out of swap space.
    ==16317==     - Valgrind has a bug.  If you think this is the case or you are
    ==16317==     not sure, please let us know and we'll try to fix it.
    ==16317==     Please note that programs can take substantially more memory than
    ==16317==     normal when running under Valgrind tools, eg. up to twice or
    ==16317==     more, depending on the tool.  On a 64-bit machine, Valgrind
    ==16317==     should be able to make use of up 32GB memory.  On a 32-bit
    ==16317==     machine, Valgrind should be able to use all the memory available
    ==16317==     to a single process, up to 4GB if that's how you have your
    ==16317==     kernel configured.  Most 32-bit Linux setups allow a maximum of
    ==16317==     3GB per process.
    ==16317== 
    ==16317==     Whatever the reason, Valgrind cannot continue.  Sorry.

我试过使用大的交换文件,但并没有变得更好。在我的交换文件快满之前很久就崩溃了。我正在使用Fedora19。有人知道这件事吗?我想我在网上读到过一些关于单个进程可以allocate.If的内存限制的东西。这种情况下,我可以在哪里设置它?至少给我一个好的选择来代替valgrind的人:P.

提前感谢

EN

回答 1

Stack Overflow用户

发布于 2013-11-03 16:31:16

“大多数32位Linux设置允许每个进程最多3 3GB。”

您已经分配了3013349376字节,这非常接近3 3GB。因此,您可能有一个32位的操作系统,并且您只是耗尽了单个进程的内存(其他大约200MB可能是valgrind开销)

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/19751094

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档