home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / os / os2 / programm / 6356 < prev    next >
Encoding:
Text File  |  1992-11-11  |  1.4 KB  |  30 lines

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