Hi,
Thanks for sharing your code. I ran into an issue when adding a 'large' amount of entries to my hashmap. After a while I would get a CEE0810 Error on a hashmapPut call.
After some testing I discovered that the problem lies in the addEntry procedure:
if (entryPtr = *null);
allocSpace(entryPtr:ENTRY_SIZE);
bucket.entryPtr = entryPtr;
...
allocSpace(entry.keyPtr:keySize);
allocSpace(entry.valuePtr:valueSize);
Space is allocated but not initialized. As a result entry.keyPtr and entry.valuePtr could contain garbage and this causes allocSpace to fail with the CEE0810 error.
My solution was to add a "clear entry" statement after allocSpace(entryPtr:ENTRY_SIZE);
The same problem applies to arraylist: (arrayAdd procedure)
entryPtr = getEntry(arrayPtr:index_);
clear entry; // initialize entry
allocSpace(entry.objectPtr:objectSize);
Kind regards
Hi,
Thanks for sharing your code. I ran into an issue when adding a 'large' amount of entries to my hashmap. After a while I would get a CEE0810 Error on a hashmapPut call.
After some testing I discovered that the problem lies in the addEntry procedure:
Space is allocated but not initialized. As a result entry.keyPtr and entry.valuePtr could contain garbage and this causes allocSpace to fail with the CEE0810 error.
My solution was to add a "clear entry" statement after allocSpace(entryPtr:ENTRY_SIZE);
The same problem applies to arraylist: (arrayAdd procedure)
Kind regards