Yes, and do NOT lock it. Allocate a  new chunk and copy it there.
Allocate the new chunk AT THE END of the DbCache heap so that not to
fragment it.

void* newPtr = MemChunkNew(1/*db cache*/,size,0xA00 /* ptr at end of heap*/);
DmWrite(newPtr,0,codePTr,size);


----
Best Regards,
Dmitry Grinberg
(847) 226 9295



On Fri, Sep 5, 2008 at 9:27 AM, Ryan Rix <[EMAIL PROTECTED]> wrote:
>>Lock code resource 1
>
> Please please please consider placing the callback in its own resource and
> save memory!
>
> ~Ryan
>
> On 9/5/08, Lionscribe <[EMAIL PROTECTED]> wrote:
>>
>> To create notification, do not copy function to Feature memory.
>> Just reopen application database with the dmModeLeaveOpen flag.
>> Lock code resource 1 using DmGetResource & MemHandleLock
>> This will really be a second lock, and will prevent the resource from
>> being unlocked when application exits.
>> Do not unlock it or close database when exiting application.
>> Now just pass a pointer to the function (not the resource) when setting
>> the notification.
>> Lionscribe
>>
>>
>> --
>> For information on using the ACCESS Developer Forums, or to unsubscribe,
>> please see http://www.access-company.com/developers/forums/
>
>
>
> --
> Thanks and best regards,
> Ryan Rix
> TamsPalm - The PalmOS Blog
>
>
> Jasmine Bowden - Class of 2009, Marc Rasmussen - Class of 2008, Erica
> Sheffey - Class of 2009, Rest in peace.
>
> --
> For information on using the ACCESS Developer Forums, or to unsubscribe,
> please see http://www.access-company.com/developers/forums/

-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/

Reply via email to