heap

How the size of stack and heap memory bound is determined in iPhone OS?

How is internally the maximum size of stack and Heap is set? How can we determine its maximum size? I am not using it for any of my projects. But this is just out of curiosity. ...

jRuby: How to correctly purge old interpreted code?

I've been testing out JRuby as a possible integrated language to a larger system, but I've run into a problem: heap space. Specifically, JRuby holds on to all the objects it uses when parsing code. I'm not talking about perm space here - there are large quantities of org.jruby.internal.runtime.methods.InterpretedMethod instances building...

Is there a libc function (or equivalent) to know the current size of the heap?

Is there a libc function (or equivalent) to know the current size of the heap? I have a memory problem in my application, and it seems being able to monitor the heap when I want to would help me find the problem. So is there a way to know the current size of the heap? ...

How to track down unmanaged heap corruption caused by VB6 application on Windows XP Pro?

Hello all. I've been having trouble with VB6, of late. I'm receiving heap corruption errors on closing the legacy VB6 application that we maintain. What I see, when I close the app, is that there was an error during run-time which, for whatever reason, didn't get reported during run-time (as we do have a pretty standard error handli...

how to use gdb to explore the stack/heap?

Hello. Could anyone please give me a quick overview/point me to documentation of a way to inspect the stack (and heap?) of a C program? I thought this should be done with GDB, but if there are other more straighforward alternatives, then that should be fine as well. Thanks. ...

Java memory Management for JNI

Hi, I have two questions : What if I have a JNI call to a method and the JNI method leaks memory. Once this method completes will the JVM Garbage collector be able to get that memory back. I heard that the JVM does not manage the Heap Space used by JNI ? But the memory used by JNI is a part of the memory used by the Java process ? Is ...

Functional Code Breaks When Used Twice.

I'm still working on my Field class, and tried to improve my piss-poor insertion/erase performance. However, the new function works once, then breaks catastrophically when I use it a second time. This is the code: template <class T> T *Field<T>::insert(const T *pPos, const T& data) { // Special case: field is empty. insert shoul...

How to set min/max heap size for equinox osgi container

Hi, does anyone know how to set the max heap size when starting equinox? I start the container from the command line as follows: java -jar org.eclipse.osgi_3.5.2.jar -console -Xmx1024M -Xms512M -XX:[MaxPermSize]=256M However, this has no effect on the max heap size and I end up with an OutOfMemoryException. I am trying to deploy a ...

POI heap space exception or any alternative java api for Excel 2007 ???

Hello i've been searching around for a solution for this problem and haven't found anything good =( so the problem is i need to create an excel file up to 50.000 registers and when i do this show me this error at 50.000 app register: java heap space as far as i'm looking on, one way to solve this is increasing the heap memory, but qu...

Where are ref value type parameters stored for asynchronous method calls in Microsoft's CLR?

I understand that this is an implementation detail. I'm actually curious what that implementation detail is in Microsoft's CLR. Now, bear with me as I did not study CS in college, so I might have missed out on some fundamental principles. But my understanding of the "stack" and the "heap" as implemented in the CLR as it stands today is...

JVM memory consumption double of heapsize

I have set maximum heap size to 4gb for 64bit Weblogic JVM. When i stress-test app, heap size never goes over 4Gb, but java.exe in taskmanager can consume up to whopping 10 Gb. Where this consumption comes from? ...

Issue with threads: value stored in heap

Hello, I have an issue with threads. I am defining a global variable, a char * that I initialize to NULL, and a mutex. pthread_mutex_t mutex; char *minURLTime; minURLTime = NULL; Then I initialize my mutex: pthread_mutex_init(&mutex, NULL); I then create a new thread: void *status; pthread_t t; pthread_create(&t, NULL, executeTh...

Min heap is, but is a max heap module defined in python?

Possible Duplicate: What do I use for a max-heap implementation in Python? Python has a min heap implemented in the heapq module. However, if one would want a max heap, would one have to build from scratch? ...

How to pin point a memory leak in a heap dump using jhat/jvisualvm tool?

How to pin point a memory leak in a heap dump using jhat/jvisualvm tool? I have a heap dump of our application generated using jmap during an "OutOfMemoryError:Java Heap Space error". I used jhat to analyse the dump but the info is too huge and I could not find where the memory leak occurred.Please help me in pin-pointing the objects t...

How to make heapq evaluate the heap off of a specific attribute?

I wish to hold a heap of objects, not just numbers. They will have an integer attribute in them that the heap can sort by. The easiest way to use heaps in python is heapq, but how do I tell it to sort by a specific attribute when using heapq? ...

Priority Queue with a find function - Fastest Implementation

Hi, I am looking at implementing a priority queue with an added requirement, a find/search function which will tell whether an item is anywhere within the queue. So the functions will be: insert, del-min and find. I am unsure whether I should use a Heap or a Self-balancing binary search tree. It appears PQs are usually implemented wit...

show static fields of a class in a heap dump

I have a heap dump, and I'm interested in the values of some static fields in a class using Eclipse MAT. How can I see these? Using MAT, I can see the class in the histogram, but it has no instances, so a number of views (objects with outgoing refs, dominator tree) are empty. MAT seems to be limited to objects and object members, but I'...

get static fields of a class in a heap dump in OQL

I have a heap dump and I'm using Eclipse MAT, though I suppose this should work through visualvm or whatever OQL client. We can select fields of all instances of a class by doing something like select s.field1, s.field2 from org.me.MyClass ... but this is restricted to member variables, and to types with instances. How can select th...

How can I fix my android photo upload to send larger streams of data

I have an android app that is attempting to upload photos to a web server via API interface. The method works fine as long as the image sizes are not too big (fails somewhere around 1280x800) Heres the code that will work will smaller images but fails with larger ones. Any suggestions? public void uploadPhoto(FileInputStream fileInputSt...

application terminates on heapsize

hi, I have defined -Xmsx 1.3GB in the java VM parameters and my Eclipse does not allow more than this, when running the application I got the below exception: Exception in thread "Thread-3" java.lang.OutOfMemoryError: Java heap space What can I do? ...