lua-users home
lua-l archive

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


Joseph Stewart wrote:
Hello my esteemed lua fans!

I use an embedded operating system that looks a lot like the old
(pre-OSX) Apple Macintosh OS. The device has no hardware MMU to
provide a "flat" memory view to software. There are many concurrent
threads competing for the heap, so the OS developers implemented a
"handle-based" memory manager (apps get "pointers-to-pointers"). App
developers are encouraged to "unlock" their memory handles when not
actively using them.

RISC OS has a similar problem. Memory fragmentation is common, and a pain. The typical solution is to use a "sliding heap" - one that keeps as small as possible. When you free a block, it shuffles everything down, and updates the handles (or anchors) to point at the new location.

It's certainly a nice solution to the problem of MMU-less hardware with tiny amounts of RAM. (Or even MMU-equipt machines, just with a witless OS, in RISC OS's case.)

I'd like to see Lua be able to use such things. I don't actually have any use for it myself, but I can see why others might find it extremely lovely.

--
Rob Kendrick