Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Feb 2003 12:43:19 -0500
From:      "Salmaan Ahmed" <sahmed@slipstreamdata.com>
To:        <freebsd-questions@FreeBSD.ORG>
Subject:   .text area copy-on-write (COW)
Message-ID:  <00b001c2dcf5$656dd430$1c00a8c0@office.slipstream.net>

next in thread | raw e-mail | index | archive | help
I'm trying to determine just how much *physical* memory is required by
one of my programs.  I have a simple program with a .text size of about
1.7MB and, when running, a resident memory size of about 2.3MB.  So far
so good.  What I don't understand is that when this program fork()s,
shouldn't the .text area be shared between parent and child (actually,
shouldn't both .text and .data be shared until modified)?  If so, then
why does the child process also have a resident memory ("RES" under
"top") of 2.2MB instead of 600k?

Am I misreading "top"? Is there some other way of determining the amount
of physical memory being used by a process?

Salmaan


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?00b001c2dcf5$656dd430$1c00a8c0>