SA-MP Forums Archive
pragma dynamic - 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: pragma dynamic (/showthread.php?tid=369902)



pragma dynamic - Mellnik - 18.08.2012

When exactly do I need it? And to which value should I set it then?


Re: pragma dynamic - Vince - 18.08.2012

Only use it when you have a bunch of large, local variables and the 'code size' message comes up when compiling. Most scripts don't need this.


AW: Re: pragma dynamic - Mellnik - 18.08.2012

Quote:
Originally Posted by Vince
View Post
Only use it when you have a bunch of large, local variables and the 'code size' message comes up when compiling. Most scripts don't need this.
But its shown in my script:
Header size: 7316 bytes
Code size: 527904 bytes
Data size: 598880 bytes
Stack/heap size: 16384 bytes; estimated max. usage: unknown, due to recursion
Total requirements: 1150484 bytes


Im compiling with -d3


Re: pragma dynamic - AndreT - 18.08.2012

Don't be worried about your resource usage, here is mine:
Code:
Header size:          20992 bytes
Code size:          1075032 bytes
Data size:           717636 bytes
Stack/heap size:      16384 bytes; estimated max. usage: unknown, due to recursion
Total requirements: 1830044 bytes
Since you compile with -d3, it makes sense that it comes up.

I don't have the exact knowledge on how it works internally or what the usage exactly depends on, but there is a huge variety of optimizations and general coding practices that help scripters avoid the messages ever popping up when compiling without the high debug flag. If they do, however, it gives a pretty hint that things could be done in a better manner.

And as you can see, my gamemode is larger than yours and without the debug flag, the messages don't show up either.


AW: Re: pragma dynamic - Mellnik - 18.08.2012

----