"Chunk not locked" is displayed in MemLocalIDToPtr. This function is called a
lot in DmInsertionSort, so nailing down the specific problem is tricky.
However, I'm concerned at your number of records. It's over 35,000. I notice
that DmInsertionSort uses ints (16-bit values), so there could be some overflow
problem there.
DmNumRecords returns a UInt, implying that only 64K records are supported. From
the problem you've turned up, perhaps internally only 32K records are supported.
-- Keith Rollin
-- Palm OS Emulator engineer
Shin Tanaka <[EMAIL PROTECTED]> on 08/02/2000 11:07:59 AM
Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent by: Shin Tanaka <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
cc: (Keith Rollin/US/PALM)
Subject: RE: [Q] MemoryMgrNew.c Error Message
I am not sure what I did wrong... This is what I did;
typedef struct{
Char prodID[MaxProdIDLen + 1];
Char prodAlt[MaxAltIDLen + 1];
Char prodDesc[MaxProdDescLen + 1];
} FeiProduct;
static Int CompareIDFunc(FeiProduct *rec1, FeiProduct *rec2, Int unusedInt,
SortRecordInfoPtr unused1, SortRecordInfoPtr unused2,
VoidHand appInfoH)
{
Int result;
result = StrCompare(rec1->prodID, rec2->prodID);
return(result);
}
In Main program;
ldbP = DmOpenDatabaseByTypeCreator(opening with dmModeReadWrite);
if (lpdP)
{
DmInsertionSort(ldbP, (DmComparF *) CompareIDFunc, 0);
DmCloseDatabase(ldbP);
}
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Nesse,
Rustin
Sent: Wednesday, August 02, 2000 12:56 PM
To: Palm Developer Forum
Subject: RE: [Q] MemoryMgrNew.c Error Message
I've seen that alot. When you go to write to your record, are you
locking the pointer? Like this:
recP = MemHandleLock( Record );
// do processing
MemPtrUnlock( recP );
Sometimes I get that message if I unlock a pointer twice (or unlock
an unlocked pointer).
-Rus
>-----Original Message-----
>From: Shin Tanaka [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, August 02, 2000 9:41 AM
>To: Palm Developer Forum
>Subject: [Q] MemoryMgrNew.c Error Message
>
>
>Hi, folks. I have a (newbie) question.
>
>Whenever sorting a large number of records (35,000+) using
>DmInsertionSort(), I receive this error message
>
>"MemoryMgrNew.c, Line:3081, Chunk not locked"
>
>What does it mean? Each record size is at most 70 bytes. I am using
>SPT1700 and CW R6 with 3.1 SDK.
>
>
>Thanks.
>
>
>
>
>
>
>
>
>--
>For information on using the Palm Developer Forums, or to
>unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
>
--
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/
--
For information on using the Palm Developer Forums, or to unsubscribe, please
see http://www.palmos.com/dev/tech/support/forums/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/