Squeak on Palm OS 5?

Swan, Dean Dean_Swan at Mitel.COM
Tue Oct 8 23:25:49 UTC 2002


Guys,

	While it is true that Palm OS 5 is really intended to still run 68K applications, it is possible to write native ARM routines where speed is an issue.  Also, it is possible to allocate a contiguous chunk from the Storage Heap (not to be confused with the Dynamic Heap) that is bigger than 64K.

	See this link for a *very* brief reference:

		http://www.us.sonypdadev.com/spotlight/

Basically, you allocate a chunk of Feature Memory, which you still have to use the Data Manager DmWrite to write to, and this data will persist even across application invocations.

This might be doable for Squeak.  To get better performance, it might be a good idea to wedge a write cache in front of the object memory to consolidate writes and avoid frequent calls to the Palm OS DmWrite function.

	Personally, I would recommend just giving in to the Dark Side of the Force, sign up with the Evil MS Empire, and get an iPaq if you really need Squeak in your pocket, but if you must have it on Palm OS, it is possible.

	I must admit the new Sony Palm OS 5 devices are very attractive, though.

								-Dean


-----Original Message-----
From: Tommy Thorn [mailto:thorn at meko.dk]
Sent: Tuesday, October 08, 2002 4:25 PM
To: squeak-dev at lists.squeakfoundation.org
Subject: Re: Squeak on Palm OS 5?


Joern Eyrich wrote:

>As far as i know, these limits are still there, slightly less than 64k for a chunk of the dynamic heap. I remember someone proposed to allocate a big chunk of the storage heap instead, which doesn't have these restrictions, but then the storage heap is write protected for normal applications or something like that.
>

That sounds like the rules for the "usual" PalmOS.  Disappointing that 
it hasn't changed. To give a little more detail, the dynamic heap (the 
Unix BSS segment) is limited to slightly less than 64k, however the 
static data and stack is much less. Recent GCC's have enabled 
practically unlimited code space.

So programs needing more space _has_ to allocate records in the 
database. These can be locked down so you can get a pointer to them and 
treat them as read only memory.  The maximum size of a record is 
slightly less than 64k, but successfully allocating such a big record 
depends on how fragmented the heap is. The big problem of course is 
updating. The official and santioned way is to use a database write 
syscall which is obviously fairly expensive.  There is a way around 
that. The memory protection can be (globally) disabled enabling 
read/write access to the whole database. Only this is a scary thing to 
do as it's very easy for an otherwise innocent bug to cause database 
corruption for other unrelated applications. And them, even if you do 
this, you'll still not be able to have a big consecutive piece of 
memory, but only chunks scattered around the memory space.

Palm was really short sighted when they defined PalmOS.

/Tommy





More information about the Squeak-dev mailing list