byronknoll / cmix

cmix is a lossless data compression program aimed at optimizing compression ratio at the cost of high CPU/memory usage.
http://www.byronknoll.com/cmix.html
GNU General Public License v3.0
613 stars 45 forks source link

std::bad_alloc on Windows #25

Closed tazr closed 6 years ago

tazr commented 6 years ago

I am compiling cmix v14 under msys2 (gcc 7.2.0 Rev2).

Compiling works fine and ./cmix prints the help.

However ./cmix -c ./README ./foo (or any other file really) results in

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc

EDIT

Windows version is Windows 7 64bits

byronknoll commented 6 years ago

std::bad_alloc happens when there is failure to allocate storage. How much RAM does your computer have? Do you have a page (or swap) file enabled? If so, what is the max size for the page file?

tazr commented 6 years ago

I have 16GB of memory, no pagefile. The README of cmix is not a big file, I would not expect running out of memory in that case?

byronknoll commented 6 years ago

16GB is not enough, even for small files. However, it should work (slowly) if you add a pagefile. Let me know if you have other questions.

byronknoll commented 6 years ago

Ah, the memory requirement is listed on the cmix website ( http://www.byronknoll.com/cmix.html) but not in the readme file. I will update the readme to list that - thanks!

On Wed, Jan 24, 2018 at 12:50 AM, tazr notifications@github.com wrote:

Oh OK, I wouldn't know, thanks. Are there hardware requirements or suggestions for running cmix listed somewhere? I failed to find them. I suppose other people could also be surprised by the amount of memory needed to compress even small files.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/byronknoll/cmix/issues/25#issuecomment-360061747, or mute the thread https://github.com/notifications/unsubscribe-auth/AK7Cy70xk65_3SxztAGtbvJN3sGUo66Dks5tNu7YgaJpZM4RpcUZ .