unhandled exception: OutOfMemoryException

  • Thread starter Thread starter Starwort
  • Start date Start date
S

Starwort

I write a program handle a large amount of data,
it run smooth on develop computer, but not on other
client/test computer, even the test computer has much
more resource, any setting i should concern?

develop pc: athlon 2800+, 1G physical memory, 2G Virtual memory, install
visual studio
test pc: core 2 duo e4500, 2G physical memory, 2G Virtual memory, fresh
install, only hardware driver and windows update

develop pc show that i use about max 1.5g between running to end
test pc, show "unhandled exception: OutOfMemoryException" and max use 1.7g
of memory

what should i do/install/set to avoid the problem?
 
Well, if you got an OutOfMemory exception, its almost always because you were
really out of memory.

You haven't provided any details on what your code does or how it is
handling the large amounts of data, so it would be difficult to make
recommendations. Obviously the first step would be to examine your code for
unhandled exceptions and / or unreleased resources that may need to be
disposed, and take a look at some ways to "Chunk up" your process so that it
works on smaller amounts of data at a time. More details, more help.
-- Peter
http://www.eggheadcafe.com
http://petesbloggerama.blogspot.com
http://www.blogmetafinder.com
 
Well, you haven't given any indication of what you could be doing which
would cause the problem, so it's really hard to tell.

The only suggestion I can think to give is to run a profiler and try and
see where your memory consumption is (if you don't have a clue already) and
work from there.
 
Starwort said:
I write a program handle a large amount of data,
it run smooth on develop computer, but not on other
client/test computer, even the test computer has much
more resource, any setting i should concern?

develop pc: athlon 2800+, 1G physical memory, 2G Virtual memory, install
visual studio
test pc: core 2 duo e4500, 2G physical memory, 2G Virtual memory, fresh
install, only hardware driver and windows update

develop pc show that i use about max 1.5g between running to end
test pc, show "unhandled exception: OutOfMemoryException" and max use 1.7g
of memory

what should i do/install/set to avoid the problem?

There must be a free, continuous, block of memory for whatever object is
being created/filled/copied. Having 1GB free, but having fragmented memory
and the largest free being 100kb, and request 101 kb, will fail in this way.
 
both OS is windows xp pro

i only declare serveral fix size matrix array, (size only related to a fix
size database)
no any pointer and random size veriable

so i wonder why 1G physical machine can run it, but 2G machine can't

i search from google, about iis and 4gt problem
but i don't understand the detail and does it related to my problem

any idea? thanks for help
 
Back
Top