Indigo Rose Software
  #1  
Old 09-10-2008
jassing's Avatar
jassing jassing is offline
Indigo Rose Customer
 
Join Date: Jan 2001
Location: Anderson Island, WA, USA
Posts: 1,901
lzma error -- suggestions

Suggestion:
(Other than suggesting using the dll than shelling out)

When seeing if the "dictionary size" was fixed, I got this error when using anything over 128:

Code:
LZMA 4.43 Copyright (c) 1999-2006 Igor Pavlov  2006-06-04

Error: Can not allocate memory

Error 2091: Could not compress file using LZMA: C:\Clients\GrantSkellenger\FlashBack\HPS FlashBack Installation Files\DirectX\Redist\ManagedDX.CAB
I also tested the latest release of lzma.exe and the latest beta; same thing.

It would seem that a pre-launch memory availability could be done - or a parsing for "Can not allocate memory" so that the SUF8 can then offer "Try reducing the dictionary size" would be helpful.

The system has 2 gig of ram installed, with 400Meg "free" before the start of the build; during the build it dropped to around 135meg free...


update: I closed some other programs and got 800meg free; still anything over 128 yeilded cannot allocate memory.
__________________

Last edited by jassing; 09-10-2008 at 06:52 AM.
Reply With Quote
  #2  
Old 09-10-2008
Lorne's Avatar
Lorne Lorne is offline
Indigo Rose Staff Member
 
Join Date: Feb 2001
Location: Indigo Rose Software
Posts: 2,588
A 128 MB dictionary size is too big for your available memory. For LZMA compression the memory use is about 10 times more than the dictionary size. (For decompression it's about equal with the dictionary size.)

Depending on the kind of allocation scheme the LZMA compressor uses, it might even require contiguous address space, which means you might not have enough usable memory even if you have all of it free, because of address space fragmentation. (Memory can never become fragmented, but the address space that describes it can.)
__________________
--[[ Indigo Rose Software Developer ]]
Reply With Quote
  #3  
Old 09-11-2008
jassing's Avatar
jassing jassing is offline
Indigo Rose Customer
 
Join Date: Jan 2001
Location: Anderson Island, WA, USA
Posts: 1,901
Quote:
Originally Posted by Lorne View Post
A 128 MB dictionary size is too big for your available memory. For LZMA compression the memory use is about 10 times more than the dictionary size. (For decompression it's about equal with the dictionary size.)

Depending on the kind of allocation scheme the LZMA compressor uses, it might even require contiguous address space, which means you might not have enough usable memory even if you have all of it free, because of address space fragmentation. (Memory can never become fragmented, but the address space that describes it can.)
.... And since we know this up front, we can tell the user, instead of a cryptic 3rd party error message...

.... And since you capture the output of the 3rd party compression routine, you could give more advice to the user...

It was a suggestion to help the end user with 3rd party error messages. Since you're using a 3rd party comrpession program, not everyone will really understand that it's "not IR's problem" -- and you have enough information to help the user understand this error - in addition;you are able to help it from happening in the 1st place.
__________________
Reply With Quote
  #4  
Old 09-11-2008
Lorne's Avatar
Lorne Lorne is offline
Indigo Rose Staff Member
 
Join Date: Feb 2001
Location: Indigo Rose Software
Posts: 2,588
...and since we're all perfect at IR and have infinite time...

I wasn't involved in the SF8 compression change or the docs for it. I was responding based on my knowledge of LZMA and compression in general.

In any case thanks for your suggestions, Josh. I've added them to the database. REF: 17794

I'll also suggest that a note about the relationship between dictionary size and memory use be added to the help file. REF: 17795
__________________
--[[ Indigo Rose Software Developer ]]
Reply With Quote
  #5  
Old 09-11-2008
jassing's Avatar
jassing jassing is offline
Indigo Rose Customer
 
Join Date: Jan 2001
Location: Anderson Island, WA, USA
Posts: 1,901
Quote:
Originally Posted by Lorne View Post
For LZMA compression the memory use is about 10 times more than the dictionary size. (For decompression it's about equal with the dictionary size.)
The more I think about this statement, the more I think that more serious warnings need to be given to the user.

Why have a 1 gig dictionary size at all? on a win32 machine; you cannot access 10 gigs of memory..
__________________
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -6. The time now is 04:18 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright © 2000 - 2009 Indigo Rose Corporation. All rights reserved.
Indigo Rose Software