home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.os2.programmer
- Path: sparky!uunet!utcsri!skule.ecf!torn!watserv2.uwaterloo.ca!watserv1!csg.uwaterloo.ca!giguere
- From: giguere@csg.uwaterloo.ca (Eric Giguere)
- Subject: Re: Static variables in DLL's == shared memory ???
- Message-ID: <BxL18B.Mwy@watserv1.uwaterloo.ca>
- Sender: news@watserv1.uwaterloo.ca
- Organization: Computer Systems Group, University of Waterloo
- References: <1992Nov11.164359.2195@cs.tu-berlin.de> <1992Nov11.192049.14742@ans.net>
- Date: Thu, 12 Nov 1992 02:50:34 GMT
- Lines: 18
-
- In article <1992Nov11.192049.14742@ans.net> db3l@ans.net (David Bolen) writes:
- >It depends on how you define your DATA segments in your linker
- >definition file. If you defined them as shared, then yes, all
- >processes using the DLL will see the same static storage. If you
- >define it as nonshared (more typical) than each process will get it's
- >own copy.
- >
- >Having them all share static data space can prove very convenient in
- >some cases, but you do have to be careful.
-
- And as a further note: a DLL with shared dataspace can be an easy
- way to store data that is to be shared among two or more processes
- without going through the trouble of using shared memory. Just don't
- forget to use semaphores to control access to the data....
-
- --
- Eric Giguere giguere@csg.UWaterloo.CA
- So is Windows NT short for "Windows, NOT?"
-