-----Original Message----- From: Brian Smith [mailto:[EMAIL PROTECTED]] Sent: Friday, 4 January 2002 9:05 AM To: Palm Developer Forum Subject: Efficiency question
> I have an app that currently allocates memory in the dynamic (as opposed > to storage) area of RAM to hold text for multiple scrollable "windows". I > need to make some room for some later features, though, so I'm considering > moving this buffer storage to the storage area of RAM. Would I be seeing > any kind of noticeable slow-down in doing this? I haven't had a chance > yet to try it out. Using storage memory is less efficient than using dynamic heap for write access, because data storage area is write protected, so that you need DmWrite or something equivalent (istead of just placing the data, as in case of dynamic storage), which involves a trap to overcome write protection. However for reading you souldn't have this problem. > What I'm doing right now is allocating one block of memory to store a line > (after word wrapping) and keeping an array of handles. Those blocks are > allocated and freed as text is displayed. That might be the way to go. Assuming you keep your documents in the data base, you can probably read straight from the data storage (with no need to copy them to dynamic heap); I assume you lock only handles for the records which are currently displayed, otherwise that could get PalmOS terribly engaged. Michael. -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
