Tuesday, July 03, 2018

Re: "Cannot allocate memory" error when memory is enough

On Tue, Jul 03, 2018 at 05:31:22PM +0800, Nan Xiao wrote:
> Hi all,
>
> Greeting from me!
>
> I am running OpenBSD 6.3, and don't know from when, loading some
> binary will prompt "Cannot allocate memory":
>
> $ egdb
> ksh: egdb: Cannot allocate memory
>
> $ cmake
> ksh: cmake: Cannot allocate memory
>
> But the memory seems enough:
> $top
> ......
> Memory: Real: 57M/1365M act/tot Free: 2546M Cache: 925M Swap: 0K/4103M
> ......
>
> I try to use "ktrace/kdump" tool, but can't find something special:
> ......
> 21881 ktrace NAMI "/usr/local/bin/egdb"
> 21881 ktrace RET execve -1 errno 12 Cannot allocate memory
> ......
>
> Could anyone give some clues? Thanks very much in advance!
> Best Regards
> Nan Xiao

Check your limits.

ulimit -a

from the shell will tell you what's wrong.

you might also need to brush up on login.conf and get your user into
a different class.

No comments:

Post a Comment