Stack/Heap size - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Stack/Heap size (
/showthread.php?tid=581452)
Delete -
gurmani11 - 13.07.2015
Delete
Re: Stack/Heap size -
Banana_Ghost - 13.07.2015
There's nothing wrong with that.
Stack/heap size: 16384 bytes; = Total
estimated max. usage=2843 cells (11372 bytes) = Estimated
16384 - 11372 = 5012
Usually, when your usage exceeds the stack size, it'll automatically show that message saying something along the lines of "estimated max. usage unknown due to recursion.".
This is what you should worry about
:
Код:
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
Header size: 20280 bytes
Code size: 1343676 bytes
Data size: 18741396 bytes
Stack/heap size: 16384 bytes; estimated max. usage: unknown, due to recursion
Total requirements:20121736 bytes
If you're using more memory than allocated in your stack, your server could possibly crash as well as overwrite runtime data.
That same warning could also come from calling a function from within the same function. The compiler doesn't know how much memory to allocate for it.
There's probably someone that can explain it better, it's easier to know than to explain.
Re: Stack/Heap size -
Evocator - 13.07.2015
Quote:
Originally Posted by Banana_Ghost
This is what you should worry about :
Код:
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
Header size: 20280 bytes
Code size: 1343676 bytes
Data size: 18741396 bytes
Stack/heap size: 16384 bytes; estimated max. usage: unknown, due to recursion
Total requirements:20121736 bytes
|
You are so wrong mate. Its a recursion. Which means you called a function somewhere within itself. This is nothing to worry about.
Re: Stack/Heap size -
jamesbond007 - 13.07.2015
Quote:
Originally Posted by Ralfie
You are so wrong mate. Its a recursion. Which means you called a function somewhere within itself. This is nothing to worry about.
|
how is he wrong? isnt recursion the same as saying calling a function with the same function..
anyway i dont see whats the problem.. i usually get this message and its nothing to worry
Re: Stack/Heap size -
Banana_Ghost - 13.07.2015
Quote:
Originally Posted by Ralfie
You are so wrong mate. Its a recursion. Which means you called a function somewhere within itself. This is nothing to worry about.
|
Well if you read below that.....
Quote:
Originally Posted by banana_ghost
If you're using more memory than allocated in your stack, your server could possibly crash as well as overwrite runtime data.
That same warning could also come from calling a function from within the same function. The compiler doesn't know how much memory to allocate for it.
|
I was giving an example of what he should be worried about.....
Like I said, there's nothing wrong with your code at the OP.
Delete -
gurmani11 - 13.07.2015
Delete