unable to allocate memory error on mac os x - java(xx,xx) malloc: *** mmap(size=XX) failed (error code=12)

不问归期 提交于 2019-12-11 18:27:17

问题


I believe it's a general issue but if it helps I'm running LucidDB database (0.9.4) on Mac OS X 10.8 with 16GB RAM. The database software is written mainly in Java with some parts in C++. When I increased buffer pool size to 1GB I got the following error.

java(669,0xfc621000) malloc: * mmap(size=16777216) failed (error code=12) error: can't allocate region ** set a breakpoint in malloc_error_break to debug

I believe that buffer pool uses shared memory so I increased max available shared memory (kern.sysv.shmmax, kern.sysv.shmall) to 2GB. I also increased java heap size (Xms, Xmx) to 1536MB. I'm stuck, any hints?


回答1:


Whenever I have seen these strange low level error under linux I have traced it to a lack of resource of some kind such as running out of swap or remapping virtual memory too often. There should be a utility which gives you a dump of all the memory mappings in the running program. I would check whether the number of mappings is too high.



来源:https://stackoverflow.com/questions/13782840/unable-to-allocate-memory-error-on-mac-os-x-javaxx-xx-malloc-mmapsize

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