Script size, unknown amount of cells
#1

Is this normal?

Header size: 15460 bytes
Code size: 629628 bytes
Data size: 1051372 bytes
Stack/heap size: 17039360 bytes; estimated max. usage: unknown, due to recursion
Total requirements:18735820 bytes

These are my includes:
#include <a_mysql>
#include <sscanf2>
#include <streamer>
#include <YSI\y_va>
#include <YSI\y_hooks>
#include <YSI\y_commands>
#include <YSI\y_timers>
#include <YSI\y_bit>
#include <foreach>
#include <h_colors>
#include <fixes2>
#include <strlib>
Reply
#2

Yes it's normal, due to the fact your usage fluctuates in the script based on different circumstances.
Reply
#3

Quote:
Originally Posted by mahdi499
Посмотреть сообщение
Yes it's normal, due to the fact your usage fluctuates in the script based on different circumstances.
Understood, I was like terrified looking at these numbers because i've worked some time on my script.
Reply
#4

Optimizing your code can get rid of this but as said above its a normal stuff.
Reply
#5

No, it's not normal stuff and it's not okay. Read:

Stack/heap size: 17039360 bytes
Total requirements:18735820 bytes

You're consuming approximately 18.7 megabytes of memory while your stack is "only" 17 megabytes in size. This means that at one point the stack will get corrupted and your server will most likely crash. At the very least you will experience some unexpected behavior where data has been overwritten.
Reply
#6

It's not normal, it's a very high usage, you might want to optimise your script, or look for any high strings, repeating loops etc.
Reply
#7

It might be some repeating loops because my code very organized and im using three global strings.
Reply
#8

I'll be honest with you, the only time I've ever seen this problem, was with a string that was over it's size, it was a typo, I needed a 1800 cell string to write a long query, I mistyped and wrote 18000, which gave me exactly what you got.
Reply
#9

These are my only string variables.
new msg[200], gText[1024], gExtra[125], query[1024];

It might be because of my includes as well, perhaps..
Reply
#10

Is there any way to search for functions that repeat themselves? This might be the problem..

EDIT:
I fixed it by removing y_timers, it must have been collided with fixes2 include and the results are:

Header size: 15204 bytes
Code size: 622592 bytes
Data size: 1045564 bytes
Stack/heap size: 16384 bytes; estimated max. usage: unknown, due to recursion
Total requirements: 1699744 bytes
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)