> > Dear All.
> >
> > As far as i know that Then memeory is divided into the three segements
> >
> > 1. Heap;
> > 2. Stack;
> > 3. Data segmnet;
>
> That may be true in some implementations, but none of these are C
> terms. In some implementations, malloc() and friends allocate memory
> from the "heap", local variables are on the "stack", and static and
> global variables are in the "data segment" -- but others may do things
> differently.
>
hi as u r writing that static and global will be in data segment , data segment is the part which is copied if an application is all ready in memory .
eg. if internate exploreer is allready open and we have clicked it once more a new code copy will not be there only the data segment part will be cpoied in memory and same codesegment will be used .
is it correct? it is .
now
i have program a application in which i have use a global static variable.
if the data segment is holding the static and global variables so that segment should be copied to other segment (as a new instance of that process play) but what is happening that global static variable is incrementing for the all three instance of that process are running.