procstat -kk: Cannot allocate memory

Eric van Gyzen eric at vangyzen.net
Tue Mar 8 20:29:27 UTC 2016


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


More information about the freebsd-stable mailing list