heap

Java heap terminology: young, old and permanent generations?

I'm trying to understand how the concepts of young, old and permanent generations in the Java heap terminology, and more specifically the interactions between the three generations. My questions are: What is the young generation? What is the old generation? What is the permanent generation? How does the three generations interact/rela...

Do I have to allocate everything on the heap (that gets stored within) heap containers?

Hi, I'm overriding the new operator to manually allocate heap space when using the new keyword. Usually using a stack-allocated heap container with pointers to its items- CArray<CObject*> objects; -is fine. but I'm picky and I want to make buffers- CArray<CObject> objects; -that let me modify POD types. So, I allocate them on the ...

heap VS anon memory in the result of pmap

The following is the result after run on solaris, it shows there are two heaps, but in my understanding, for a process, there is only one heap which is a large continuous memory which can be managed by brk to expand or shrink the size. And for anon memory, a process can have many anon memory which can be managed by mmap/munmap. Is my und...

Multithreaded Heap Management

In C/C++ I can allocate memory in one thread and delete it in another thread. Yet whenever one requests memory from the heap, the heap allocator needs to walk the heap to find a suitably sized free area. How can two threads access the same heap efficiently without corrupting the heap? (Is this done by locking the heap?) ...

Excel POI 3.5 WorkBook Java Heap Space Exception ?

Hi, I am using latest POI 3.5 for Excel reading . I have Excel MS office 2007 installed and for that poi is providing XSSF for executing the data. For 15000 lines of data it is executing properly , but exceeding the limit till 30000 or 100000 or 200000 , it is prone to java heap space exception. code is below : enter code here UA...

How to dynamically monitor Java heap size?

Hi, I am trying to monitor the java heap size dynamically. Does anybody know how to get the maxmium memory used in the process of running a piece of codes? Does the Runtime.maxMemory() do the trick? Thanks ...

overhead for an empty heap arena

My tools are Linux, gcc and pthreads. When my program calls new/delete from several threads, and when there is contention for the heap, 'arena's are created (see the following link for reference http://www.bozemanpass.com/info/linux/malloc/Linux_Heap_Contention.html). My program runs 24x7, and arenas are still occasionally being created ...

Can I get Tomcat running as a service to dump heap?

I am attempting to have Tomcat, which is currently running as a service on a Windows 2003 box, dump heap on an OutOfMemoryError. (Tomcat is running Hudson, which is reporting a heap space problem at the tail end of my build. Running the build manually produces no such error. The Hudson guys need a heap dump to get started.) As instru...

Java Outofmemory heap space error: How do I make a deque from a vector?

Hi, I'm new to Java and really need your help. I am presently using a queue, a receiver thread puts data into this queue and the parser reads out of this. But the problem is the receiver may receive at incredible peak speed, eg. 3000/sec, while the parser only parses at 100/sec. EDIT:I have checked, the queue first stays at 100 o...

How can I control the order heap objects are destroyed?

Let's say I have 2 singletons, allocated on the heap, for which no delete is ever called. Let's call them A and B. Is there any way to make sure B will be the first one to be destroyed? I'm assuming the platform may matter on this one: Visual Studio 2005 Professional, Visual C++. Everything was built with cl. ...

What is the definition for the height of a tree?

I can't seem to find a definitive answer for this, I'm trying to do some elementary proofs on heaps but here's what's throwing me off a little bit: Is an empty tree valid? If so, what is its height? I would think this would be 0. What is the height of a tree with a single node? I would think this would be 1 but I have seen definitions...

Why Java JTextArea doesn't receive the entire pasted text?

Using Netbeans 6.8 (Mac Version) drag and drop tool for making the GUI, I have designed a JTextArea which the user should paste his data which the program will modify and show it to him. It is working fine; however, when I tried to paste about 65 thousand lines of testing data in the JTextArea, the GUI showed only a few of these lines (...

Problems with java heap space, how to increas the heap size?

Hello. I'm running a ".bat" file which points to asant: C:\Sun\SDK\bin\asant Startbds asant again points to a xml file i've got, build.xml: <target name="Startbds" description="Start bds"> This has been fine for now, but now i have added more data, which leads to an out of memory error: java.lan...

Heap class in .NET

Possible Duplicate: Fibonacci, Binary, or Binomial heap in c#? Is there any class like heap in .NET? I need some kind of collection from which I can retrieve min. element. I just want 3 methods: -add -removeMinElement -getMinElement I can't use sorted list because there keys has to be unique, and I might have several identica...

Is there any way to pre-allocate the heap in the .NET runtime, like -Xmx/-Xms in Java?

On most platforms and with most JVMs you can pre-allocate the heap on start-up by setting the -Xmx and -Xms options (or a variant thereof) to the same size. Is it possible to do the same with .NET, and if so, how? ...

What does "zend_mm_heap corrupted" mean

All of the sudden I've been having problems with my application that I've never had before. I decided to check the Apache's error log, and I found an error message saying "zend_mm_heap corrupted". What does this mean. OS: Fedora Core 8 Apache: 2.2.9 PHP: 5.2.6 ...

Is there a C++ MinMax Heap implementation?

I'm looking for algorithms like ones in the stl (push_heap, pop_heap, make_heap) except with the ability to pop both the minimum and maximum value efficiently. AKA double ended priority queue. As described here. Any clean implementation of a double ended priority queue would also be of interest as an alternative, however this question ...

how to get the min and max heap size settings of a JVM from within a Java program

How to get the min and max heap size settings of a VM from within a Java program? ...

Loading Huge resolution images causing Heap error in j2me

Hello, I am trying to load a 3776 * 2816 PNG, 24 bit image - 804KB onto my phone , the MOTO ROKR e6.It gives up with java.lang.OutOfMemoryError,Is their a general way to handle loading such high resolution images.The phone's internal memory is only 8MB, I think this has something to do with the error. I have also, tried to split the im...

How to use iterators in java?

I have implemented Priority Queue interface for making heap. Can you tell me how to implement an iterator on the top of that? point me to some apropriate tutorial,i am new to java and on a very short deadline here. Actually i need a method to find and modify an object from heap on the basis of Object.id. I dont care if it is O(n). publi...