ZipArchive Library: Memory Fragmentation and usage

0 votes
asked by about ZipArchive
edited by

We have an embedded real time system (Win-API compatible) with very limited memory (256) and with an different heap management. We discovered a problem with memory fragmentation. The system loses up to 4MB available memory for each newly created archive. We tried different buffer sizes without any success (SetAdvanced()). How can we avoid memory fragmentation while using the ZipArchive library?

ZipArchive uses all the available memory during closing segmented archives without throwing a bad_alloc exception. The size of the archives is up to 2GB. Why does ZipArchive reserves all memory for closing archives? How can we avoid this? Is there a set-method for limiting the memory usage? We also tried to set different commit modes without any success, the behavior is the same.

1 Answer

0 votes
No avatar answered by (309k points)
edited by

The developers have a big API documentation page and examples on how the program can be used in various situations. I recommend that you use the link posted below to access the pages with the information. You can check the examples to see how to implement the given ideas and solution to your business and needs.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register
...