oom

How can I see what is in my heap in Java?

I've managed to get a memory 'leak' in a java application I'm developing. When running my JUnit test suite I randomly get out of memory exceptions (java.lang.OutOfMemoryError). What tools can I use to examine the heap of my java application to see what's using up all my heap so that I can work out what's keeping references to objects wh...

From what Linux kernel/libc version is Java Runtime.exec() safe with regards to memory?

At work one of our target platforms is a resource constrained mini-server running Linux (kernel 2.6.13, custom distribution based on an old Fedora Core). The application is written in Java (Sun JDK 1.6_04). The Linux OOM killer is configured to kill processes when memory usage exceeds 160MB. Even during high load our application never go...

How do I reliably tell that two Inspector references point to the same inspector instance?

[continued from Is there a way to tell whether two COM interface references point at the same instance?] I've got references to Inspector objects from two different sources and need to be able to tell which item from one source corresponds to which item from the other source. However, none of the approaches I have been able to come up w...

iPhone Out of Memory WEIRD crashing problem

Hi My app crashes after about 20 minutes with status 101 (Out of Memory, I believe) Debugging using Instruments - ObjectAlloc and Leaks gives me no clues. The ObjectAlloc graph stays at a nice constant level of around 1 million bytes (1MB), as does the Net # of allocations. I have got rid of all leaks. I thought it could be something ...

How to avoid OOM (Out of memory) error when retrieving all records from huge table?

Hi all, I am given a task to convert a huge table to custom XML file. I will be using Java for this job. If I simply issue a "SELECT * FROM customer", it may return huge amount of data that eventually causing OOM. I wonder, is there a way i can process the record immediately once it become available, and remove the record from memory a...

How to detect Out Of Memory condition?

I have an application running on Websphere Application Server 6.0 and it crashes nearly every day because of Out-Of-Memory. From verbose GC is certain there are the memory leaks(many of them) Unfortunately the application is provided by external vendor and getting things fixed is slow & painful process. As part of the process I need to...

How to debug a MemoryError in Python? Tools for tracking memory use?

I have a Python program that dies with a MemoryError when I feed it a large file. Are there any tools that I could use to figure out what's using the memory? This program ran fine on smaller input files. The program obviously needs some scalability improvements; I'm just trying to figure out where. "Benchmark before you optimize", as...

After "OOM Killer", is there a "Resurrector" ?

I understand that on Linux there is a kernel functionality referred to as "OOM Killer". When the OOM (Out-Of-Memory) condition subsides, is there such a thing as a "Process Resurrector" ? I understand this functionality would be difficult to implement for all sorts of reason, but is there something that gets close to it? Edit: Example:...

BitmapFactory OOM driving me nuts

I've been doing a lot of searching and I know a lot of other people are experiencing the same OOM memory problems with BitmapFactory. My app only shows a total memory available of 4MB using Runtime.getRuntime ().totalMemory(). If the limit is 16MB, then why doesn't the total memory grow to make room for the bitmap? Instead it throws a...

MATLAB block size and memory management

I'm using a block processing approach to handle a calculation between two large matrices. The code significantly speeds up when using a larger block size. But if I go too large, then I get an Out of Memory error. Currently I hand-tune my code to find the largest working block size for a given input. My question: how can I automate ...

Displaying a bitmap of arbitrary size without running out of memory.

How do I display an image of arbitrary size without OOMing or downscaling the image. I dont want to downscale due to zooming and dragging of the picture? If it isnt possible to display an image of arbitrary size, how do I determine the maximum possible size of the image to display, without causing a OOM? ...