I was wrote a little scratch program to check the time of looping through a 2 dimensional array by rows or columns, since I remembered that one way was much faster for large data sets, but I couldn’t remember which way. I ran into an interesting error when I ran my program though. Now in my test I am using
Tag: heap-memory
where is array saved in memory in java?
If I have a function that in that function I declare: Where are arr and the whole array stored? heap? stack? Does it matter if the declaration is in some function or in main()? and let’s say I also have these command lines: where are arr[0] and arr[1] stored? Answer Memory diagram: Boxes are memory locations (where binary numbers can
How to find root of memory leaks?
My app is basicly and image editor. There is a welcome page which opens main activity with an intent. If orientation changes when main activity is working the memory consumption simply doubles up and remains that way. If i close the main activity turn back to welcome activity and start main activity again same problem does not occur. I think
Java heap space in a looped function
Hi I have a java application that is processing a number of records from a database. Now after processing about a 160 of these the java runs throws a “OutOfMemoryError: Java heap space”. Due to this I updated the entire function in order to only process 150 records at one go, which works fine when I simply call that function
is there hash code / Heap address for primitive types in Java?
I was trying to find some approximization to address on heap , and you guys gave me the function System.IdentityHashCode(Object). The problem is – this function doesn’t fit for primitive types. I’ll explain why. I’m given as input Java compiled program – class file. My goal is to plot some graphs that will contain some information about variable access between
Java heap space (java.lang.OutOfMemoryError)
In my project, I have a module to upload multiple image and create the thumbnails for it at once. For uploading, I am using JavaFX and for creating thumbnails, I am using Java. I wrote upload code and call of thumbnail creation function inside a for loop. If the number of uploading images is more than five, I am getting
Applet: Java heap space
Due to a small implementation mistake I discovered how quickly I could reach a Java heap space issue now the bug is fixed everything is fine but it did get me looking into how to solve this and I foudn multiple solution such as java -Xms5m -Xmx15m MyApp the problem is that this changes the java memory on my computer,
Eclipse Memory Analyzer – Leak Suspects Report doesn’t point to MY classes – why?
I’m trying to determine whether or not I have a memory leak in my webapp. I’m using VisualVM and JMeter to load test and watch the heap. I saved a heap dump to file and downloaded Eclipse Memory Analyzer yesterday…after much frustration with VisualVM, I thought Eclipse would pinpoint the leak, if any, better than VisualVM. I opened the heap
OutOfMemory Exception – how does VisualVM help locate the memory leak with heapdump file?
I’ve been testing my webapp locally on my pc and monitoring it with VisualVM. I recently also started using JMeter, as it was suggested that I should do some load testing since I suspected that I have a slow memory leak somewhere. Today my webapp finally threw the OutOfMemory exception. I had the HeapDumpOnOutOfMemoryError and HeapDumpPath params set in case
Why does a BufferedImage require so much memory beyond the size of its data array?
I’m trying to determine how much heap any given TYPE_INT_ARGB BufferedImage will use so that, for a program which is doing some image processing, I can set a reasonable max heap based on the size of image we feed it. I wrote the following program as a test, which I then used to determine the least maximum heap under which