At 2:13 AM -0800 2002/02/01, Kashev Georgi wrote:
>In a project, that I work on, I need to sort datas in
>a database record. The sorting must be as quick as
>possible, but the record is large (~10KB). There is
>not enought dinamic memory for a temporary buffer, so
>sorting must be made directly in storage heap. The use
>of DmWrite makes the process too slow. I have tried to
>disable the protection, but failed. It seems I have no
>access to Hardware maped registers. I have searched
>the documentations of MC68000 and DragonBall series,
>but did not find a way to switch processor in
>supervisor mode.
>If someone know haw to do this, I will appreciate the help.

Well, first off, switching the device into Supervisor mode won't do you any good. Nor 
will poking willy nilly at the DragonBall registers. The API used to disable the 
storage heap protection is an unpublished system-use-only API. I and probably every 
other Palm customer cringes in terror at the very thought of allowing any 3rd party 
application to disable storage heap protection and access that memory directly and 
unsupervised. You should probably re-assess your need for speed, especially for 10k of 
data(?!)

Perhaps you can use DmQuickSort if you're actually trying to sort multiple database 
records, and/or maintain an array of offsets or indexes in the dynamic heap to the 
data in the storage heap for use in the sorting operation? Just how much data (how 
many items) are you really sorting anyway?

Regards,

Jim Schram
Palm Incorporated
Partner Engineering

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to