Virtual memory consumption (both user and kernel) in modern CURRENT

Kris Kennaway kris at obsecurity.org
Thu Feb 16 17:34:29 PST 2006


On Thu, Feb 16, 2006 at 02:15:55PM +0200, Dmitry Pryanishnikov wrote:

> Without putchar() call my program's virtual address space isn't so big:
> 
>   PID USERNAME  THR PRI NICE   SIZE    RES STATE    TIME   WCPU COMMAND
> 52126 root        1 127    0  1244K   440K RUN      0:31 43.97% a.out
> 
> But with putchar() it gives us
> 
>   PID USERNAME  THR PRI NICE   SIZE    RES STATE    TIME   WCPU COMMAND
> 58959 root        1 130    0 50100K   632K RUN      0:03 47.19% a.out
> 
> What't the reason of so terrible virtual memory consumption? I don't believe
> that just plain stdio buffering requires 50 Mbytes (!) of virtual address
> space.

Note that only 200K of extra memory is used.  Using 50MB of virtual
address space is not going to cause any problems unless the pages are
touched, which as you can see from the resident size, they aren't.
See also the old "omg, rpc.statd has as size of 256MB" entry in the
FAQ.

Kris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20060216/63361fb5/attachment.bin


More information about the freebsd-current mailing list