Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Mar 2010 19:50:15 +0100
From:      Pieter de Goeje <pieter@degoeje.nl>
To:        freebsd-questions@freebsd.org
Cc:        Jayadev Kumar <jayadev.kumar@gmail.com>
Subject:   Re: API to find the memory usage of a process.
Message-ID:  <201003201950.15698.pieter@degoeje.nl>
In-Reply-To: <4cac4bed1003181028h74aff209y31e9c70bfb6ec367@mail.gmail.com>
References:  <4cac4bed1003181028h74aff209y31e9c70bfb6ec367@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



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