-
-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EXC_RESOURCE (RESOURCE_TYPE_MEMORY: high watermark memory limit exceeded) (limit=30 MB) from inside an iOS Widget extension #26
Comments
Hi,
Also, you can disable thread-safety by placing But, all of this will not fully help you. Cause the biggest ammount of memory is archive's dictionary. And to reduce the size of dictionary, you need to create/use archive with compression level <= 3. |
Thanks for detailed context @OlehKulykov 🙏 Just so you know, I have very limited knowledge about compression, so some of my questions may be off.
Is there any calculation I can use to understand what is contributing to the memory consumption? Example:
How does thread safety affect memory consumption? How are those two related?
Thanks! I am currently using level 9, as I need to have the smallest size possible. Will play with the compression level value (the main problem I see is that reducing the compression level results in a bigger archive) Couple more questions if you can 🙏
|
Hi,
Good luck. |
P.S.: Some info about this SDK. Reminder from README: the structure of SDK for iOS looks like:
In case of a very limited memory, depending on your skills(I don't know), for your specific needs, you can implement next:
|
Thank you so much for this great amount of context. It is very much enlightening, appreciate it a lot
Thanks! I am already doing this and linking PLzmaSDK statically 👍 I will try the alternatives you mentioned and write here the results when I have them 🙏 |
Hi 👋
I am using this library to decompress some selected files that have a specific prefix from an archive. I an doing it from inside a Widget extension, in iOS. The total decompressed size of the files to decompress is 4MB, the decompressed archive is 120MB, and the archive itself is 10MB. The decompression code is as follows:
During that operations I get a runtime exception saying
EXC_RESOURCE (RESOURCE_TYPE_MEMORY: high watermark memory limit exceeded) (limit=30 MB)
. Seems like the Widget extension has some memory limits enforced by iOS, and the decompression is exceeding them. As a result, the OS kills the process in the middle of the decompression operation.Is there any way to configure the decompression so it uses less memory?
Thanks!
The text was updated successfully, but these errors were encountered: