Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Mar 2016 14:29:19 -0600
From:      Eric van Gyzen <eric@vangyzen.net>
To:        Garrett Wollman <wollman@csail.mit.edu>, freebsd-stable@freebsd.org
Subject:   Re: procstat -kk: Cannot allocate memory
Message-ID:  <56DF361F.5010800@vangyzen.net>
In-Reply-To: <22239.13127.949472.929342@khavrinen.csail.mit.edu>
References:  <22239.13127.949472.929342@khavrinen.csail.mit.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On 03/08/2016 14:17, Garrett Wollman wrote:
> Sometimes when running "procstat -kk", I get the following error:
>
> procstat: sysctl: kern.proc.pid: 1044: Cannot allocate memory
>
> What is the condition that causes this?  Is there a static limit in
> procstat, or in the kernel, that needs to be increased?

"Cannot allocate memory" from sysctl usually means the requested data
grew between the two calls to sysctl.  In this case, perhaps there are
more stack frames during the second call than during the first. 
libprocstat should probably allocate a little more memory than the first
sysctl prescribed, in order to accommodate this growth.

Eric



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?56DF361F.5010800>