Bug 22436 – std.zip expand: memory allocation failed

Status
NEW
Severity
enhancement
Priority
P4
Component
phobos
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2021-10-25T19:00:18Z
Last change time
2024-12-01T16:39:36Z
Assigned to
No Owner
Creator
selimozel
Moved to GitHub: phobos#10483 →

Comments

Comment #0 by sozel — 2021-10-25T19:00:18Z
I wrote about this zip/memory issue in the forums too [1]. Here's some part of the description: "It turns out my computer was literally running out of memory as the file was getting unzipped. For some reason to uncompress a 1-gig file with uncompressed size of 4-gig, Zip Archive of D-Lang tries to use more than 16 gig of RAM. I don't know why. Maybe I missed something. I use a Windows 10, DMD v2.091 with x86_mscoff. My work around was to call 7z from D Lang and do the compression over there. That worked like a charm. It seems that zip.d [1] calls uncompress routine from zlib.d [2]. Would calling zlib uncompress by chunks solve this memory issue? Any ideas?" [1] https://forum.dlang.org/post/[email protected]
Comment #1 by johan_forsberg_86 — 2021-10-25T21:33:28Z
Have you tested several files? Does it work with smaller ones like around 400 MB? Just trying to pinpoint the problem.
Comment #2 by sozel — 2021-10-26T15:37:57Z
I'll take a look into testing with a smaller file. Need a couple of days though :)
Comment #3 by robert.schadek — 2024-12-01T16:39:36Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/phobos/issues/10483 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB