Raised This Month: $ Target: $400
 0% 

Give more memory to a plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ingram
Veteran Member
Join Date: May 2004
Old 08-27-2004 , 21:29   Give more memory to a plugin
Reply With Quote #1

i got error 3 on a plugin

3 - AMX_ERR_STACKERR This means that the plugin has run out of memory for local variables. By default each plugin gets 8K for local variables.

anyway to change this?
Ingram is offline
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 08-27-2004 , 21:31  
Reply With Quote #2

let us see ur code
Freecode is offline
jtp10181
Veteran Member
Join Date: May 2004
Location: Madison, WI
Old 08-27-2004 , 22:14  
Reply With Quote #3

you prob are having infinite loop (recursion) issues and its creating tons of new variables and not cleaning up old ones cause the function is not quitting. Seen it b4 in superhero (bugs I made, heh).

There is a way to give the plugin more though, its in the small documentation and its form #pragma define thing.
__________________
jtp10181 is offline
Send a message via ICQ to jtp10181 Send a message via AIM to jtp10181 Send a message via MSN to jtp10181 Send a message via Yahoo to jtp10181
Ingram
Veteran Member
Join Date: May 2004
Old 08-27-2004 , 23:00  
Reply With Quote #4

well it was simplier actually. Just created 2 large arrays for simplicity. If i ran the function i got that error. I worked it down to one, i just thought thats a little annoying and whats the point of it?
Thx for the solution
Ingram is offline
BAILOPAN
Join Date: Jan 2004
Old 08-27-2004 , 23:48  
Reply With Quote #5

Code:
#pragma dynamic 32768
Creates 128KB of memory for your plugin, default size is 4096 cells (16KB).

Stack error can only be caused by overflowing the stack, which is caused by calling new on huge arrays or by using recursion.

Using a loop with creating variables should be okay since the stack is cleaned up.
__________________
egg
BAILOPAN is offline
Ingram
Veteran Member
Join Date: May 2004
Old 08-28-2004 , 00:02  
Reply With Quote #6

any maximum to #pragma ?? (other than ur ram)
Ingram is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:21.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode