Bug 64387 - Big POIFS stream result in OOM
Summary: Big POIFS stream result in OOM
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: POIFS (show other bugs)
Version: 4.1.x-dev
Hardware: All All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-28 23:04 UTC by Andreas Beeker
Modified: 2020-04-28 23:08 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Beeker 2020-04-28 23:04:53 UTC
In [1] it was noticed, that encrypting huge streams result in OOMs.
This was due to cached ByteBuffers of NIO channels, which were necessary because of mmap problems in Windows.

I've introduced now a release method, to unmap buffers, which aren't used anymore. So unmapping makes only sense in stream like handling, where buffers aren't revisited anymore.


[1] https://stackoverflow.com/questions/61463301/apache-poi-throwing-oom-error-when-trying-to-password-protect-modest-sized-xlsx
Comment 1 Andreas Beeker 2020-04-28 23:08:54 UTC
Applied via r1877144