Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (OptimusPrime, AndrewAMD), 14,580 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Memory Section tutorial #74964
05/21/06 06:58
05/21/06 06:58
Joined: Feb 2004
Posts: 10
M
MasterC Offline OP
Newbie
MasterC  Offline OP
Newbie
M

Joined: Feb 2004
Posts: 10
When ever you create an .exe program.
You are creating 3 segments or memory.
Your compiler reserved the memory for you.

1 is the code segment or code memory: is a memory that contain all the instructions that you wrote but in machine language

2 is the data segment or data memory: is a memory that contain all your data
but they are immortal you cannot destroyed them during your application
They are created at beginning of your application and destroyed when your done with your application

3 is the stack segment or stack memory: is a memory that contain all your data but they are mortal, they are destroyed at the end of a block
ex:

function(-50);
var function(var x)
{
abs(x);
}

the << (var x) >> : means that your are creating a variable x into the stack


YOU ASK THE COMPILER TO RESERVE MEMORY FOR THE VARIABLE x INTO A STACK SEGEMENT AND COPY THE VALUE -50 TO THE VARIABLE x

BETWEEN THE PARENTHESES { } YOU CAN YOU USE THE VARIABLE x BECAUSE THE LIFE TIME OF THE VARIABLE START BETWEEN { }. You call it IN SCOPE.

BUT AT THE END OF THE { } OR WHEN ITS OUT OF SCOPE THE VARIABLE x is destroyed by poping out the data out of the stack memory

Re: Memory Section tutorial [Re: MasterC] #74965
05/21/06 07:29
05/21/06 07:29
Joined: Jun 2004
Posts: 2,234
Wisconsin USA
FoxHound Offline
Expert
FoxHound  Offline
Expert

Joined: Jun 2004
Posts: 2,234
Wisconsin USA
Edit: I missed the tutorial part in the title.

You should post this in the tutorial forum.

Last edited by FoxHound; 05/21/06 07:33.

---------------------
There is no signature here.


QUIT LOOKING FOR ONE!

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1