Help with stack/heap size
#1

Hello everyone. I'm compiling my script with -d3 in pawn.cfg and this comes out in the output only with -d3:
Код:
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase

Header size:          18164 bytes
Code size:          2011044 bytes
Data size:          4643736 bytes
Stack/heap size:   17039360 bytes; estimated max. usage: unknown, due to recursion
Total requirements:23712304 bytes

2 Warnings.
* I'm using YSI 4.0 (which is still in beta)
* Fixes & Fixes 2

What bothers me is that the total requirements is 23MB of memory while stack is limited to 17MB...
I'm working with y_ini and fixes, fixes2.. I have red on the internet they might be the source of the problem. but why?
(I'm not having any serious loops or not needed cells like 1000, im having one global 1700 which is bigstring for long dialogs, etc.. highest next cell is 256 and its used on maybe long messages, however when its just name with some words im using 128 and less sometimes)

I would like to ask either if you know any fast account saving / loading file write. (Not mysql, I cant afford mysql database) As im using y_ini to write almost every save/load system and im worring of problems like the stack/heap size.
Reply
#2

It's not because of beta, but recent sa-mp added "addsiren" to CreateVehicle. Update your samp server and default includes. Do you experience any specific problems, or are you worried about heap size? Y_malloc allows for dynamic arrays creation, however it needs to reserve some space in heap first.
Reply
#3

Yeah you are right! I have updated the includes forgot about it. Thanks about this.
About stack/heap size, yeah im a bit worried about "Total requirements:26482192 bytes" & Im not experiencing problems, but im worried this output isn't normal and will make problems accour when there is alot of players in the server.

About Y_malloc, I couldn't find any tutorial on how use it to make my scripts be more efficent can you explain or direct me to a known tutorial?
Reply
#4

Nope, larger stack/heap won't affect players at all. There doesn't seem to exist such tutorial, I might write on up this week (tho I have first to write about changes in y_groups). However if you don't use it directly, things like inline functions, some hooks, and some commands will.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)