ComputerForum.com ComputerForum.com  
Go Back   Computer Forum > Computer Software > General Software

Reply
 
LinkBack Thread Tools Display Modes
Old 01-30-2006, 08:30 PM   #1 (permalink)
New Member
 
Join Date: Feb 2005
Posts: 14
Default How to handle OutofMemory exceptions??

Hello,

I am working on a project that requires me to generate long reports that can have 150 pages or more - Each of these pages are generated as an A4 image (~3500x2480pixels), which is then inserted into an ArrayList...

The problem however is that I'm repeatedly getting OutOfMemory exceptions that I seem to be unable to get rid of despite extensively clearing all objects i'm not using (using the Image.Dispose() method for example) as well as forcing the garbage collector (GC.Collect()) every now and then...

I'm constructing each of these images in the 1bpp pixel format that would mean that each of these images would be ~1MB on average... For 200 images, this (crudely) corresponds to a 200MB ArrayList.. I agree this is a size larger than many RAMs, but shouldn't my computer be able use the pagefile (my pagefile is set to 512MB)??

Any one has any ideas on how I can get rid of, or even handle, these OutOfMemory exceptions??

Thanks,

Sarab
sarabjit is offline   Reply With Quote


Old 01-30-2006, 10:10 PM   #2 (permalink)
Diamond Member
 
Join Date: May 2005
Location: here
Age: 22
Posts: 1,027
Default

have u tried this with small nos of page reports?
houssam_ballout is offline   Reply With Quote
Reply

Bookmarks

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
Trackbacks are On
Pingbacks are On
Refbacks are On

All times are GMT +1. The time now is 04:51 PM.


Powered by: vBulletin Version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc.
Copyright © 2002-2008 Computer Forum and Web Design Forum