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

  1. Newsgroups: comp.os.os2.programmer
  2. Path: sparky!uunet!destroyer!gatech!news.ans.net!ans.net!db3l
  3. From: db3l@ans.net (David Bolen)
  4. Subject: Re: Static variables in DLL's == shared memory ???
  5. Sender: news@ans.net (News Administrator)
  6. Message-ID: <1992Nov11.192049.14742@ans.net>
  7. In-Reply-To: ernst@opal.cs.tu-berlin.de's message of Wed, 11 Nov 1992 16: 43:59 GMT
  8. Date: Wed, 11 Nov 1992 14:26:14 GMT
  9. References: <1992Nov11.164359.2195@cs.tu-berlin.de>
  10. Organization: Advanced Network & Services, Inc. - Elmsford, NY
  11. Lines: 23
  12.  
  13. In article <1992Nov11.164359.2195@cs.tu-berlin.de> ernst@opal.cs.tu-berlin.de (Ernst Kloecker) writes:
  14.  
  15. >If I load a DLL containing static variables at runtime and the same DLL
  16. >is loaded by another process, is the static data shared between the two
  17. >processes ? (Hopefully not ;-)
  18.  
  19. It depends on how you define your DATA segments in your linker
  20. definition file.  If you defined them as shared, then yes, all
  21. processes using the DLL will see the same static storage.  If you
  22. define it as nonshared (more typical) than each process will get it's
  23. own copy.
  24.  
  25. Having them all share static data space can prove very convenient in
  26. some cases, but you do have to be careful.
  27.  
  28. --
  29. -- David
  30. --
  31. /-----------------------------------------------------------------------\
  32.  \              David Bolen             \  Internet: db3l@ans.net      /
  33.   |   Advanced Network & Services, Inc.   \   Phone: (914) 789-5327   |
  34.  / 100 Clearbrook Road, Elmsford, NY 10523  \   Fax: (914) 789-5310    \
  35. \-----------------------------------------------------------------------/
  36.