valgrind: mmap(0x600000, 8192) failed in UME with error 12 (Cannot allocate memory)

♀尐吖头ヾ 提交于 2019-12-01 19:13:54

问题


I was following this exercise. This page has instructions to install Valgrind 3.6.1 but this version of Valgrind is not supported by my current Linux kernel version. So, I installed Valgrind 3.11.0 and followed the instructions there after and on running this command:

  $ valgrind ./ex4

got this error:

valgrind: mmap(0x600000, 8192) failed in UME with error 12 (Cannot allocate memory).

How to do I fix it?

I'm using Ubuntu 14.04 LTS with kernel version 4.4.0


回答1:


The error which you have encountered is actually a kernel bug, which was fixed in the subsequent versions. More details here:
https://bugzilla.redhat.com/show_bug.cgi?id=1301093

To overcome the error, I would suggest you to update the kernel.
Note: I am myself using running Ubuntu 14.04 on kernel version 3.16.0-67 and it runs without any hassles.

Edit: As pointed out by the OP in comments, the bug has been fixed in kernel version 4.5.2.



来源:https://stackoverflow.com/questions/36375371/valgrind-mmap0x600000-8192-failed-in-ume-with-error-12-cannot-allocate-memo

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!