lua-users home
lua-l archive

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

On Mon, Feb 18, 2013 at 6:37 AM, Rena <> wrote:
> The main thing that I suspect could be an issue is memory management.

>From the POV of dealing with hardware (DMA etc), I don't really see
the problem. (Apart from the usual issues with realtime applications,
maybe. However, any native code non-RTOS has those problems too, to
some extent.) I don't know if Lua GC has changed in this regard
lately, but typically, GC only happens when objects have no remaining
references - so you'd need a driver bug (such as releasing buffers
before disabling DMA) in order to have problems with it.

Dealing with specific address ranges (VGA framebuffer, for example) is
harder. Not sure if it's possible to "inject" memory areas like that
without upsetting the GC. Not sure if it's much point either, without
a bunch of array types and similar, so you can actually map meaningful
operations onto those memory blocks. The typical, nice and easy way
would be to just use a native library for that - a bit like how
ancient BASIC dialects used PEEK/POKE and the like, only a bit more
structured. :-)

//David Olofson - Consultant, Developer, Artist, Open Source Advocate

.--- Games, examples, libraries, scripting, sound, music, graphics ---.
|   |