Jump to content

Is the speed ok? Memory limits.


steph Arnott
 Share

You are about to reply to a thread that has been inactive for 3922 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

RLVSLTPHUD Tardis v2.3' [7/8] running scripts. 311Kb consumed for 0.006120ms of cpu time.

ADDED: This simple snippit which doesn't look much pushed the 10k limit set, back to 64k. With more memory adjustments i got the memory down to 206Kb but as i TPd it kept pushing it back to 260kKb.

(ch&CHANGED_TELEPORT)     //||ch&CHANGED_REGION) for a reason i do not no, the region change spiked the memory up.

TARDIS HUD v2.3' [9/9] running scripts. 206Kb consumed A reduction of  370Kb, five full scripts.

So whats the point of all this? If setting a memory limit is not thought out well and allowences made, it is a pointless excersise, becouse the memory will revert back to the full 64Kb.

This to me confirmed two things, one (too many scripts), no if efficent (within reason) and the other is if the memory is exceeding the set limit there is no stack heap error. unless a loop is running and the script never ends, which will error any limit.

Link to comment
Share on other sites

RLVSLTPHUD Tardis v2.3' [7/8] running scripts. 311Kb consumed for 0.006120ms of cpu time.

ADDED: This simple snippit which doesn't look much pushed the 10k limit set, back to 64k. With more memory adjustments i got the memory down to 206Kb but as i TPd it kept pushing it back to 260kKb.

(ch&CHANGED_TELEPORT)     //||ch&CHANGED_REGION) for a reason i do not no, the region change spiked the memory up.

TARDIS HUD v2.3' [9/9] running scripts. 206Kb consumed A reduction of  370Kb, five full scripts.

So whats the point of all this? If setting a memory limit is not thought out well and allowences made, it is a pointless excersise, becouse the memory will revert back to the full 64Kb.

This to me confirmed two things, one (too many scripts), no if efficent (within reason) and the other is if the memory is exceeding the set limit there is no stack heap error. unless a loop is running and the script never ends, which will error any limit.

Link to comment
Share on other sites


steph Arnott wrote:

So whats the point of all this? If setting a memory limit is not thought out well and allowences made, it is a pointless excersise, becouse the memory will revert back to the full 64Kb.

 

Yes the wiki makes mention of several cases where the limit won't change, or conditions where the script memory will be at 64K. Do you mean that in your case, you've found other conditions than what they've described?

Link to comment
Share on other sites

If the script is lets say a menu script were you are in puting destinations that are being stored, becose the script ends and returns to the state_entry then once the script is allmost exceeding the memory limit the VM ignores the limit. If a block of code is using up the memory with say a loop or calculation then when the limit is exceeded the script crashes.

ADDED:  Adromaw Lupindo some seem to be convinced that the limit set is fixed and never changes. The only time it is fixed is when the script is in a code block that is racking up the available memory.untill it reaches the set limit.

Link to comment
Share on other sites


steph Arnott wrote:

some seem to be convinced that the limit set is fixed and never changes. The only time it is fixed is when the script is in a code block that is racking up the available memory.untill it reaches the set limit.

By some you mean me I suppose.

You still haven't read what I wrote or looked at my explanatory scripts or at least you didn't understand a thing about either.

I'll try to explain as clear as I can, again: You execute the llSetMemoryLimit function. Then there are two scenarios. Either the memory use at that particular time is less or more than the llSetMemoryLimit.

If the limit is lower than the memory use, the function will be ignored completely and the limit will remain at its default 64k. That way the script will at least run (as long as memory use isn't higher than 64k of course).

If the limit is higher than the memory use, that will be the limit until you change it by script, in other words, by executing the llSetMemoryLimit again. It is not possible to go over the limit. You'll get a stack-heap collision. While a script is running, you can change both the memory limit and the memory use, that doesn't change the two scenarios I posted in any way though.

Link to comment
Share on other sites

Actually no, but if you think I am that is your choice.

ADDED: This is a forum were coders and scripters work to solve and improve If you post your code the others can see what you wish to prove. It has already been proved that depending were the limit is set or what is happening in an event as to whether the limit is obeyed or reset. If the limit is set in on_rezz event the limit is fixed, if it set in the state_entry event it is fixed only untill the script returns to the state_entry. I can see no reason for arguing about that fact.

Link to comment
Share on other sites


steph Arnott wrote:

If setting a memory limit is not thought out well and allowences made, it is a pointless excersise, becouse the memory will revert back to the full 64Kb.

I'm late getting to this thread, and I'm still not completely sure what it's all about, but just in case this is relevant: llSetMemoryLimit() only ever changes memory use in the case of a memory-limited script actually crashing. Otherwise the function only affects what memory use the script reports, and does not change the amount of memory it actually uses. So, depending on the objective, it may be a pointless exercise anyway.

Link to comment
Share on other sites


steph Arnott wrote:

Actually no, but if you think I am that is your choice.

No that was my perception, that's something completely different.


This is a forum were coders and scripters work to solve and improve If you post your code the others can see what you wish to prove.

When did you get to decide what these forums are for? And when did you get to decide what I want to do or what I have to do or what I do?

I do not want to "prove" anything. Like in the other thread, I was simply trying to explain how the memory limit works. You on the other hand seem to have the strange urge to "be right". By acting like that you don't see or don't want to see how things work and make up the most confusing posts, change them as rapidly as others can answer them, draw conclusions from thin air and completely ignore any relevant answers you get. In the end all you do is raise your hands and ask the question "what good is this memory limit?" I already answered that, in fact I did it more than once. You just don't want to hear it.

The average visitor of these forums is probably a better scripter than I am, maybe they are also better communicators. So maybe they can explain to you how things work, since I am obviously unable to do so.

I'm not going to repost 3 pages of forum here. If people want to see the scripts I posted (and yours) and everything that relates to them, I gave the link so they can have a look.

EDIT In the very unlikely case that I am wrong about the limit, please post a scenario/script showing so. It's never too late to learn.

Link to comment
Share on other sites

I already told you twice, it is a leftover of a never executed plan by Linden Lab to restrict memory usage by either sim or agent (or both, I forgot).

Right now, like you say, it's only used to inform "lag-meters" (or the estate tools which also monitor memory). The memory use doesn't have to be stable though, since you can make the memory limit variable. I also showed you that.

The irony is, the function doesn't lower memory use, it actually uses memory. So scripts with the function are less efficient than ones without.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3922 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...