In article 
<local.mail.freebsd-hackers/199907151825.laa11...@apollo.backplane.com> you 
write:
>::    -s             Print summary information  about  total  swap
>::                   space usage and availability:
>::
>::                      allocated   The total amount of swap space
>::                                  (in      1024-byte     blocks)
>::                                  currently allocated for use as
>::                                  backing store.
>::
>::                      reserved    The total amount of swap space
>::                                  (in   1024-bytes  blocks)  not
>::                                  currently    allocated,    but
>::                                  claimed by memory mappings for
>::                                  possible future use.
>::
>::                      used        The total amount of swap space
>::                                  (in  1024-byte blocks) that is
>::                                  either allocated or reserved.
>:--
>:soda
>
>    It would be really easy to test this.
>
>    Write a program that malloc's 32MB of space and touches it,
>    then sleeps 10 seconds and forks, with both child and parent
>    sleeping afterwords.  ( the parent and the forked child should
>    not touch the memory after the fork occurs ).
>
>    Do a pstat -s before, after the initial touch, and after
>    the fork.  If you do not see the reserved swap space jump
>    by 32MB after the fork, it isn't what you thought it was.

aladdin[5:32pm]> prtconf
System Configuration:  Sun Microsystems  i86pc
Memory size: 128 Megabytes

aladdin[5:41pm]> uname -a
SunOS aladdin 5.6 Generic_105182-14 i86pc i386


total: 67280k bytes allocated + 28668k reserved = 95948k used, 196460k avail
malloced 32MB...
total: 67320k bytes allocated + 61460k reserved = 128780k used, 163592k avail
touched...
total: 100084k bytes allocated + 28696k reserved = 128780k used, 163732k avail
forking...
total: 100092k bytes allocated + 61520k reserved = 161612k used, 130864k avail
touching again (parent)...
touching again (child)...
total: 132864k bytes allocated + 28748k reserved = 161612k used, 130760k avail
exiting...
exiting...
total: 67248k bytes allocated + 28700k reserved = 95948k used, 196448k avail

--
Jonathan


To Unsubscribe: send mail to majord...@freebsd.org
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to