[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua running on PalmOS!
- From: "Russell Y. Webb" <rw20@...>
- Date: Sun, 04 Mar 2001 14:33:16 -0800
Content-type: text/plain; charset="US-ASCII"
Handles in PalmOS are allocated out of dynamic memory.
If you do allocated memory from the storage heap then you generally have to
write to the memory using DmWrite and not through pointer assignment (*ptr =
value). If you do the later then a hardware memory exception is raised by
the DMA. In short you'd either have hack PalmOS, grab the memory semaphore
(a dangerous proposition and not officially something developers should do)
or change every *ptr = value in the Lua source.
My guess is that you are still using the "limited" dynamic heap.
> From: Lenny Palozzi <email@example.com>
> Reply-To: firstname.lastname@example.org
> Date: Sun, 4 Mar 2001 01:46:48 -0500
> To: Multiple recipients of list <email@example.com>
> Subject: Lua running on PalmOS!
> I hacked a version of Lua to run on PalmOS.
> In short
> * used latest gcc tools
> * compiled with PalmOS v2 SDK
> * running on PalmOS 3.1 (that's all I have), should run on PalmOS 2!
> * followed LTN 2 for a minimal version
> * rewrote Lua's generic memory allocator
> - used memory handles so memory is not allocated in the limited dynamic heap
> - memory allocation is the most difficult issue of this port. Different
> versions of PalmOS have different limitations.
> - different strategies could be used to su
?Ãht each version
> * commented a few calls to unsupported functions (fgetc, etc...)
> * test app(very limited) and Lua compiled as single executable.
> ~33K prc.
> * am able to register a C function and call it from lua, manipulate global
> variables (and opening and closing of Lua states of course)
> Not sure where I will go with this, a stable port maybe? Comments?