Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Nov 1996 10:24:44 +0000 ()
From:      Tim Pushor <timp@orion.ab.ca>
To:        questions@freebsd.org
Subject:   OS Memory questions
Message-ID:  <Pine.NEB.3.92.961106101734.2980A-100000@centaur.orion.ab.ca>

Next in thread | Raw E-Mail | Index | Archive | Help
I am fairly new to UNIX programming, and have found a home with FreeBSD
:-) I have a couple of questions though about how FreeBSD deals with text
memory.

1) If I have an app that uses a shared lib, and that shared lib is is use
by another app, do the apps share the text area?

2) If I fork, is the text area shared?

3) I am using C++. In one case, I have a class that I use many times, e.g.
	MyClass class1,class2,class3,class4,class5;
This class is basically just data, but does have a fairly elaborate
constructor to massage the data, and allocate memory for other operations.
My question is: Does the system share the text area of the class? It would
seem a waste to have a copy of the code in memory multiple times.

Thanks for any and all help.

Tim
---
Tim Pushor, Senior Systems Engineer | Phone: (403) 284-0042
Orion Technologies Inc.             | FAX:   (403) 284-9495
timp@orion.ab.ca                    | http://www.orion.ab.ca






Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.92.961106101734.2980A-100000>