PDA

View Full Version : [?] Compiler data size question


n0minal
28/07/2015, 08:33 PM
First of all I just would like to mention that it's not that simple mistake about huge usage of cells into local arrays, so don't come here to tell me that pragma dynamic would solve it when it wouldn't, as you guys can see below, my gamemode uses 869 local cells only (3476 bytes, only), but take a look into my data size, it uses ~13mb (12.42 exactly):

Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase

Header size: 7400 bytes
Code size: 787932 bytes
Data size: 13029652 bytes
Stack/heap size: 16384 bytes; estimated max. usage=869 cells (3476 bytes)
Total requirements: 13841368 bytes

Done.
[Finished in 7.1s]


I just came here to ask if the data size corresponds to the global stored cells in the gamemode, cause I really use a lot of arrays indexed to MAX_PLAYERS but all of them are necessary, so seeing as pragma dynamic doesn't have anything to do with this, should I ignore this message or is there any way to define the allocated memory for global vars?

PaulDinam
28/07/2015, 08:46 PM
13mb is totally fine, I have a huge roleplay gamemode made from scratch using dynamic memory and the size of it is around 60mb which is fine too. Even 120mb is fine but depends on the efficiency of your script.

n0minal
28/07/2015, 08:50 PM
13mb is totally fine, I have a huge roleplay gamemode made from scratch using dynamic memory and the size of it is around 60mb which is fine too. Even 120mb is fine but depends on the efficiency of your script.

Yeah its fine but this message is annoying as fuck :/ My script is well optimized btw so this wouldn't be a problem, just would like to disable this message

Nero_3D
28/07/2015, 09:01 PM
Header = Internal data
Code = Code
Data = Global memory
Stack/Heap = Local memory

You shouldn't get this message only if you used -d2 or -d3 while compiling

Kaliber
28/07/2015, 09:24 PM
Use this and the Information (if you have no pawn.cfg) is gone:

#pragma dynamic 3476

Greekz :rolleyes:

n0minal
28/07/2015, 10:24 PM
Header = Internal data
Code = Code
Data = Global memory
Stack/Heap = Local memory

You shouldn't get this message only if you used -d2 or -d3 while compiling

Yes i'll check my sublime compiler configs, thanks.

@Edit yeah that's right, the debug cmds -v2 and -d3 were active on the compiler config and I forgot to remove before:

{
"cmd": ["${project_path:${folder}}/pawno/pawncc.exe", "$file_name", "-;+", "-v2", "-d3", "-\\)+"],
"working_dir": "${file_path}",
"file_regex": "^([^\\.]+\\.pwn)\\((\\d+)\\)() : (.*)$",
"variants": [
{
"cmd": ["${project_path:${folder}}/pawno/pawncc.exe", "$file_name", "-;+", "-v2", "-d3", "-\\)+", "-l"],
"working_dir": "${file_path}",
"name": "Preprocessed output"
},
{
"cmd": ["${project_path:${folder}}/pawno/pawncc.exe", "$file_name", "-;+", "-v2", "-d3", "-\\)+", "-a"],
"working_dir": "${file_path}",
"name": "P-code output"
}
]
}

Thank you sir :)

Use this and the Information (if you have no pawn.cfg) is gone:

#pragma dynamic 3476

Greekz :rolleyes:

Did you even read the topic? What you said is completely non-sense.