weird compiler output
#1

hey everyone,

i just compiled my script, and now i get this, is this good or bad? and how to fix it if it has to be fixed? and what does it means?

Код:
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase

Header size:           3208 bytes
Code size:            50580 bytes
Data size:            44348 bytes
Stack/heap size:      16384 bytes; estimated max. usage=7311 cells (29244 bytes)
Total requirements:  114520 bytes
greets niels
Reply
#2

It's normal, because there are over 1000 strings don't worry it means how many BYTES did you use for this BIG script xD
Reply
#3

lol it isnt that bigg xD and thnx, but wont it make the server slower then?
Reply
#4

Making a size of a string bigger than you need will slow down the server abit.
Reply
#5

If you have high RAM no, at least for make a server you need 8GB Ram
Reply
#6

That warnings appears in the compiler if a possible stack / heap collision exists
You also can get a warning while running the server, if they collide you lose stored local memory

The stack a limited place where the local variables are stored
The stack / heap memory block is by default 16 kB (4096 cells) big (could be changed)

Seach for big local variables and reduce them, its unlikely that you need over 4000 cells in a function!

Example
pawn Код:
#include <a_samp>

#define KiloByte 16

#define SIZE ((KiloByte * 1024) / 4)

main() {
    Stack();
}

Stack(count = 0) {
    new
        tmp[SIZE] = {0, 1, 2, ...}
    ;
    #pragma unused tmp

    if(0 < (--count)) {
//        Stack(count); // uncomment to get the reason "due to recursion"
    }
}
Reply
#7

goto the editors settings like "run options", then search for the compiler options string, i expect it to be "-r" in your case. add "-S8192" to increase the stack/heap size to 8192 cells, which is 32768 cells.
your final compiler options string should look like
Код:
-r -S8192
after changing. if you ever get another complaint from the compiler about this, then just increase the size to like 65536 ("-S65536" then)...
Reply
#8

i dont understand you babul, but i will change the strings i setted to 5000 to 3000 xD
Reply
#9

I usually get this when trying to return a large array in a function
pawn Код:
stock my function()
{
    new array[10000];
    array="lol, bacon";
    return array;
}
Reply
#10

Quote:
Originally Posted by ******
Посмотреть сообщение
No: It's not normal and you should worry! You DO NOT need to increase the stack size as babul said, you just need to stop using so many large local variables.
hmm ye, i already lowered my strings and sizes more
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)