.Amx size 10mb
#1

Hi all, I'm doing a GameMode by 0. Now it has reached 30.000 strings but its size is over 10mb, .pwn size is only 1.7 mb.
How can I make smaller amx size GameMode is wrote in MySQL so there are some query strings which are 1000 characters.

P.S. Sorry for my bad english, I'm Italian.
Reply
#2

the .amx stores all (empty) variables, so if you add a
pawn Код:
new PlayerInfoString[MAX_PLAYERS][128];
..then your gamemode will eat already 250 KBytes (500 players * 128*4 char).
there are a few ways to decrease the size:
-redefine MAX_PLAYERS to the real amount of your slots count in order to let the compiler create smaller arrays
pawn Код:
#undef MAX_PLAYERS
#define MAX_PLAYERS 40
-use the PVars, they dont waste memory, du they get created when required
Reply
#3

check out the array sizes, you may have used huge values while creating arrays.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)