Pragma dynamic - Is good?
#1

Hello, i receive some memory info when i compile my gamemode, something like that:

Header size: 17276 bytes
Code size: 796448 bytes
Data size: 21708208 bytes
Stack/heap size: 16384 bytes; estimated max. usage: unknown, due to recursion
Total requirements:22538316 bytes

Is not good that i receive these messages at compiller?

If it's not good, is a good idea to use #pragma dynamic 140000 to hide/delete these messages?
Reply
#2

As long as you don't get a run time error related to it, don't use #pragma directive.

There was a thread about optimization, if you find it then read it and try to optimize some things.
Reply
#3

Those messages usually appear when you have debug flag level 3 on (option -d3)
They just tell you the current memory usage and sizes.

If this was something bad, I can tell you already now that
#pragma dynamic [size]
Is dependable on the situation.
A better solution would be to check the script and fix the things that is causing it. (never ending recursions etc)
Reply
#4

Eh...i have to check a lot of strings, it's difficult.
i don't have -d3 ON.

Konstantinos, because of these messages at pwn compiller, sometimes my server crashes.
That is what before server crashed:

*** glibc detected *** ./samp03svr: free(): invalid next size (fast): 0xf434a290 ***
======= Backtrace: =========
/lib/libc.so.6(-0xffb6346f)[0x272b91]
/lib/libc.so.6(-0xffb60d0[0x2752f8]
./samp03svr[0x80d3207]
./samp03svr[0x808ebab]
./samp03svr[0x8074816]
./samp03svr[0x80763ce]
/lib/libpthread.so.0(+0x6b39)[0x5a1b39]
/lib/libc.so.6(clone+0x5e)[0x2e4c2e]
======= Memory map: ========
001b9000-001d6000 r-xp 00000000 fd:00 1183333 /lib/libgcc_s-4.4.7-20120601.so.1
001d6000-001d7000 rw-p 0001d000 fd:00 1183333 /lib/libgcc_s-4.4.7-20120601.so.1
001d8000-00200000 r-xp 00000000 fd:00 1183370 /lib/libm-2.12.so
00200000-00201000 r--p 00027000 fd:00 1183370 /lib/libm-2.12.so
00201000-00202000 rw-p 00028000 fd:00 1183370 /lib/libm-2.12.so
00202000-00392000 r-xp 00000000 fd:00 1185689 /lib/libc-2.12.so
00392000-00393000 ---p 00190000 fd:00 1185689 /lib/libc-2.12.so
00393000-00395000 r--p 00190000 fd:00 1185689 /lib/libc-2.12.so
00395000-00396000 rw-p 00192000 fd:00 1185689 /lib/libc-2.12.so
00396000-00399000 rw-p 00000000 00:00 0
00399000-003a5000 r-xp 00000000 fd:00 1185650 /lib/libnss_files-2.12.so
003a5000-003a6000 r--p 0000b000 fd:00 1185650 /lib/libnss_files-2.12.so
003a6000-003a7000 rw-p 0000c000 fd:00 1185650 /lib/libnss_files-2.12.so
0040a000-00428000 r-xp 00000000 fd:00 1183367 /lib/ld-2.12.so
00428000-00429000 r--p 0001d000 fd:00 1183367 /lib/ld-2.12.so
00429000-0042a000 rw-p 0001e000 fd:00 1183367 /lib/ld-2.12.so
0059b000-005b2000 r-xp 00000000 fd:00 1183349 /lib/libpthread-2.12.so
005b2000-005b3000 r--p 00016000 fd:00 1183349 /lib/libpthread-2.12.so
005b3000-005b4000 rw-p 00017000 fd:00 1183349 /lib/libpthread-2.12.so
005b4000-005b6000 rw-p 00000000 00:00 0
00707000-0070d000 r-xp 00000000 fd:02 25306909 /home/client17/service15/samp03/plugins/filemanager.so
0070d000-0070e000 r--p 00005000 fd:02 25306909 /home/client17/service15/samp03/plugins/filemanager.so
0070e000-0070f000 rw-p 00006000 fd:02 25306909 /home/client17/service15/samp03/plugins/filemanager.so
00884000-00885000 r-xp 00000000 00:00 0 [vdso]
00973000-00982000 r-xp 00000000 fd:02 25296915 /home/client17/service15/samp03/plugins/sscanf.so
00982000-00983000 rw-p 0000e000 fd:02 25296915 /home/client17/service15/samp03/plugins/sscanf.so
00a4b000-00a52000 r-xp 00000000 fd:00 1185686 /lib/librt-2.12.so
00a52000-00a53000 r--p 00006000 fd:00 1185686 /lib/librt-2.12.so
00a53000-00a54000 rw-p 00007000 fd:00 1185686 /lib/librt-2.12.so
00d2d000-00d32000 r-xp 00000000 fd:00 1183339 /lib/libnss_dns-2.12.so
00d32000-00d33000 r--p 00004000 fd:00 1183339 /lib/libnss_dns-2.12.so
00d33000-00d34000 rw-p 00005000 fd:00 1183339 /lib/libnss_dns-2.12.so
00d3e000-00d53000 r-xp 00000000 fd:00 1185684 /lib/libresolv-2.12.so
00d53000-00d54000 ---p 00015000 fd:00 1185684 /lib/libresolv-2.12.so
00d54000-00d55000 r--p 00015000 fd:00 1185684 /lib/libresolv-2.12.so
00d55000-00d56000 rw-p 00016000 fd:00 1185684 /lib/libresolv-2.12.so
00d56000-00d58000 rw-p 00000000 00:00 0
00d87000-00d8a000 r-xp 00000000 fd:00 1183331 /lib/libdl-2.12.so
00d8a000-00d8b000 r--p 00002000 fd:00 1183331 /lib/libdl-2.12.so
00d8b000-00d8c000 rw-p 00003000 fd:00 1183331 /lib/libdl-2.12.so
00d9c000-00e3b000 r-xp 00000000 fd:02 25296913 /home/client17/service15/samp03/plugins/streamer.so
00e3b000-00e3c000 rw-p 0009f000 fd:02 25296913 /home/client17/service15/samp03/plugins/streamer.so
00e3c000-00e3d000 rw-p 00000000 00:00 0
00ee9000-00fc8000 r-xp 00000000 fd:00 2752517 /usr/lib/libstdc++.so.6.0.13
00fc8000-00fcc000 r--p 000de000 fd:00 2752517 /usr/lib/libstdc++.so.6.0.13
00fcc000-00fcd000 rw-p 000e2000 fd:00 2752517 /usr/lib/libstdc++.so.6.0.13
00fcd000-00fd4000 rw-p 00000000 00:00 0
08048000-08095000 r-xp 00000000 fd:02 25296908 /home/client17/service15/samp03/samp03svr
08095000-08097000 rwxp 0004d000 fd:02 25296908 /home/client17/service15/samp03/samp03svr
08097000-08176000 r-xp 0004f000 fd:02 25296908 /home/client17/service15/samp03/samp03svr
08176000-08198000 rw-p 0012e000 fd:02 25296908 /home/client17/service15/samp03/samp03svr
08198000-081a3000 rw-p 00000000 00:00 0
09138000-0913b000 rw-p 00000000 00:00 0
0913b000-0913c000 rwxp 00000000 00:00 0
0913c000-0df0c000 rw-p 00000000 00:00 0
efd00000-efd21000 rw-p 00000000 00:00 0
efd21000-efe00000 ---p 00000000 00:00 0
f1100000-f1122000 rw-p 00000000 00:00 0
f1122000-f1200000 ---p 00000000 00:00 0
f1269000-f126a000 rw-p 00000000 00:00 0
f126b000-f38ff000 rw-p 00000000 00:00 0
f38ff000-f3900000 ---p 00000000 00:00 0
f3900000-f4300000 rw-p 00000000 00:00 0
f4300000-f4400000 rw-p 00000000 00:00 0
f44ff000-f4500000 ---p 00000000 00:00 0
f4500000-f4f00000 rw-p 00000000 00:00 0
f4f00000-f4f21000 rw-p 00000000 00:00 0
f4f21000-f5000000 ---p 00000000 00:00 0
f5000000-f5021000 rw-p 00000000 00:00 0
f5021000-f5100000 ---p 00000000 00:00 0
f5100000-f5121000 rw-p 00000000 00:00 0
f5121000-f5200000 ---p 00000000 00:00 0
f5274000-f52ff000 rw-p 00000000 00:00 0
f52ff000-f5300000 ---p 00000000 00:00 0
f5300000-f5d00000 rw-p 00000000 00:00 0
f5d00000-f5d21000 rw-p 00000000 00:00 0
f5d21000-f5e00000 ---p 00000000 00:00 0
f5e43000-f63a8000 rw-p 00000000 00:00 0
f63a9000-f6d7a000 rw-p 00000000 00:00 0
f6d7a000-f6d7b000 ---p 00000000 00:00 0
f6d7b000-f77cc000 rw-p 00000000 00:00 0
f77d6000-f77d9000 rw-p 00000000 00:00 0
Reply
#5

That error is related to memory, load crashdetect plugin and compile with -d3 flag (https://github.com/Zeex/samp-plugin-...ith-debug-info) to be sure.

Found the thread I mentioned: https://sampforum.blast.hk/showthread.php?tid=571550
Reply
#6

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
That error is related to memory, load crashdetect plugin and compile with -d3 flag (https://github.com/Zeex/samp-plugin-...ith-debug-info) to be sure.

Found the thread I mentioned: https://sampforum.blast.hk/showthread.php?tid=571550
Yes, it's about memory, that's the reason why my server crashes.
If i use Pragma dynamic, my problem would be solved?
Reply
#7

This #pragma solved this?
Reply
#8

No it did not, pragma sends a message to the pawno to ignore the error and does not solve it, don't use it! to fix the stack/heap problems limit your variables arrays and don't use variables excessively, to fix loose indentation simply indent your god damn code.
Reply
#9

Quote:
Originally Posted by RogueDrifter
Посмотреть сообщение
No it did not, pragma sends a message to the pawno
pawno is just a text editor it's pawn compiler
Quote:
Originally Posted by RogueDrifter
Посмотреть сообщение
to fix loose indentation simply indent your god damn code.
he's talking about #pragma dynamic not tabsize
Reply
#10

Quote:
Originally Posted by Marshall32
Посмотреть сообщение
pawno is just a text editor it's pawn compiler

he's talking about #pragma dynamic not tabsize
#pragma dynamic fixes the stack/heap message you get when you compile?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)