lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


>Your example doesn't include roi.create, system.imagerequest,
system.imageavailable and system.displayrefresh. 
>Are any of these >functions accessing the global variable cel ? If so
why don't you provide them ?
>
>As you can see every time you send more code or information about it,
the problem seems to be in the code you didn't send. That's why >we
usually ask for *complete* examples.

No, no functions use the cel variable. It's only declared. I already
decoupled the system.x functions from the problem. They are not needed.
I also explained why they aren't there. Please read my posts carefully.

I've already established that the GC is the culprit for the delays. I
just need to run the GC at every coroutine.yield, and gone are my
delays. I never experienced any other "bad" behaviour such as crashes,
wrong answers or whatever. It was just the delays. The delays are caused
by the GC.

I only want to know, _why_ is the Lua memory required at run time for a
thread growing? And it _appears_ to be growing proportional to the size
of the cel variable. It doesn't matter what _type_ of data the cel
variable holds. It also doesn't matter wheter or not this variable is
actually used in the thread or in the program at all.

My theory is, that with every thread create, some space is allocated for
the thread (which is natural), but also some additional space for the
"global" variables accasible for that thread...The space required for a
thread should be constant, but it isn't. It's directly proportional to
the size of the variable cel. This is weird behaviour. Once again, it
has nothing to do with the system.x functions, I already ruled them out.

Maybe a few hints on where to look in the Lua sources?

Max