SA-MP Forums Archive
Question about 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: Question about Stack/heap size? (/showthread.php?tid=369862)



Question about Stack/heap size? - ddnbb - 18.08.2012

I have found a function that makes me use #pragma dynamic 3000 (is'nt that much?), anyways i decreased the function's string as much as i could. But is this serious, because the function is getting called once/server start, its under OnGameModeInit and it loads a huge string from a file. So does it matter afterall?


Re: Question about Stack/heap size? - ReneG - 18.08.2012

All #pragma dynamic does is set how much memory can be allocated. It shouldn't matter. It could be optimized though, depends on why a huge string needs to be loaded.


Re: Question about Stack/heap size? - ddnbb - 18.08.2012

Quote:
Originally Posted by VincentDunn
Посмотреть сообщение
All #pragma dynamic does is set how much memory can be allocated. It shouldn't matter. It could be optimized though, depends on why a huge string needs to be loaded.
Hmmm. Some people say it's very serious, include ******.

But anyway, its setting variables, from a huge string which is splitted with '|'. I guess i can keep scripting with peace on my mind then?


Re: Question about Stack/heap size? - ReneG - 18.08.2012

If that's what needs to be done then yes, I don't see any other way.


Re: Question about Stack/heap size? - ddnbb - 18.08.2012

Quote:
Originally Posted by VincentDunn
Посмотреть сообщение
If that's what needs to be done then yes, I don't see any other way.
But this action doesnt affect on my server, right? Like wouldnt cause corrupt returns and that stuff?