large text file 381MB, Vista crash

English main discussion
Post Reply
  • Author
  • Message
Offline
Posts: 17
Joined: Sun Oct 05, 2008 5:58 am

large text file 381MB, Vista crash

Post by g4qber »

get "Error allocating memory for edit control."

perhaps akelpad could detect large file size before loading?


test text file is "1234567890" repeated
used Hex Editor Neo

286MB txt file OK.

vista 32 business
2.5GB RAM

Offline
Site Admin
Posts: 6311
Joined: Thu Jul 06, 2006 7:20 am

Post by Instructor »

File size: 100Mb (ANSI codepage).

Reading a file in the RAM: 100Mb * 2 = 200Mb
Sending the text from the RAM in AkelEdit/RichEdit: 200Mb * 2 = 400Mb
Clearing the RAM: 400Mb - 200Mb = 200Mb

Result: peak requirement for memory - 400Mb


File size: 100Mb (UTF-16LE or UTF-16BE codepage).

Reading a file in the RAM: 100Mb = 100Mb
Sending the text from the RAM in AkelEdit/RichEdit: 100Mb * 2 = 200Mb
Clearing the RAM: 200Mb - 100Mb = 100Mb

Result: peak requirement for memory - 200Mb


If you don't have required free memory, you will get "Error allocating memory for edit control."

Offline
Posts: 17
Joined: Sun Oct 05, 2008 5:58 am

Post by g4qber »

using 2.1.3
have 2550MB total RAM
have free memory 1237MB

1. load 381MB txt file.
2. the file displays in the background
3. the memory message appears
4. program crashes

in task manager,
381MB txt file:
455MB base reading
2.33GB peak
error
crash

476MB txt file:
446MB base
1.37GB peak
error
crash

572MB txt file:
463MB base
1.57GB peak
error
crash


286MB txt file loads OK.
408MB base
2.23GB peak
1.14GB final


editpadlite can load files up to 2GB.

Offline
Site Admin
Posts: 6311
Joined: Thu Jul 06, 2006 7:20 am

Post by Instructor »

g4qber wrote:using 2.1.3
have 2550MB total RAM
have free memory 1237MB
4.1.3?
Read the previous post again. Your maximum file to open:
Ansi - 1237 / 4 = 309Mb
Unicode - 1237 / 2 = 618Mb

Offline
Posts: 17
Joined: Sun Oct 05, 2008 5:58 am

Post by g4qber »

yes, you are right 4.1.3

it would be good if akelpad checked to see if it could open the file before trying to open it.

but I guess that it would involve more code & making the program bigger.


if this is not the case, then perhaps akelpad should exit more nicely than it does at the moment
ie.
it crashes & Vista tries to look for a solution.
Post Reply