API to find the memory usage of a process.

Pieter de Goeje pieter at degoeje.nl
Sat Mar 20 18:50:24 UTC 2010

On Thursday 18 March 2010 18:28:48 Jayadev Kumar wrote:
> Hi,
>     I  need to find the memory usage of a process, from inside the process.
> Is there any system call
> do this ? I was trying to find it from 'top' utility source code. I
> couldn't find the port which it is coming
> from yet.
> Thanks,
> Jayadev.

Check out getrusage(2).

- Pieter

More information about the freebsd-questions mailing list