🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.ms
Article #13868

Memory Questions

#13868
From: Brian Keith Carlisle
Date: Thu, 21 Dec 1989 00:44
17 lines
1103 bytes
I'm new at Windows programming and have a few questions about memory 
management.  For that matter, I'm fairly new at C programming, although I've
had a good amount of experience with Pascal (which always handled memory
issues so comfortably).

I'm writing a Windows bases program in C and I declare several global
variables.  Where are these global variables put?  If they're put in the 
data segment, and I don't have to go through the "get handle, local lock/
global lock, etc.," how can I be sure that these variables are valid (since
my data segment can be moved by Windows)?

Also, as long as I'm asking questions, what are the advantages and 
disadvantages of Global Memory & Local Memory?

Thanks a lot for the info.

AnchorMan
Technical Details
Message-ID: <25230@cup.portal.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!portal!cup.portal.com!AnchorMan

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!portal!cup.portal.com!AnchorMan
From: AnchorMan@cup.portal.com (Brian Keith Carlisle)
Newsgroups: comp.windows.ms
Subject: Memory Questions
Message-ID: <25230@cup.portal.com>
Date: 21 Dec 89 00:44:25 GMT
Distribution: usa
Organization: The Portal System (TM)
Lines: 17