Cycle 12, day off #2:
I have found the extra memory issue. I was looking at the allocator capacity. What I should have looked is the allocated size. The way it works, is that if the initial capacity is reached, it fallback by allocating a dynamically allocated chunk of 64KB. The message that I was looking at was needing 1400 bytes which is more than my reserved 1KB.
I have increased my space to 1.5KB and now it stopped allocating the extra 64KB... Until, I got a msg needing 6KB...
Switching my parsing from DOM to SAX style would eliminate this problem and I have figured how this could be done... but this is by far not a very high priority task...
I have found the extra memory issue. I was looking at the allocator capacity. What I should have looked is the allocated size. The way it works, is that if the initial capacity is reached, it fallback by allocating a dynamically allocated chunk of 64KB. The message that I was looking at was needing 1400 bytes which is more than my reserved 1KB.
I have increased my space to 1.5KB and now it stopped allocating the extra 64KB... Until, I got a msg needing 6KB...
Switching my parsing from DOM to SAX style would eliminate this problem and I have figured how this could be done... but this is by far not a very high priority task...