heap

increasing heap size in netbeans.conf file

I was reading in netbeans 6, you don't have to set the maximum heap size, it will just look at your computer for that information. My system has 8 gigs of ram, but my application only has 64mb to play with and it is running out of memory. I did a: System.out.println(Runtime.getRuntime().maxMemory()); And it is 66 650 112 bytes (63.56...

Debugging parameter corruption in C++?

I've got a plugin system in my project (running on linux), and part of this is that plugins have a "run" method such as: void run(int argc, char* argv[]); I'm calling my plugin and go to check my argv array (after doing a bunch of other stuff), and the array is corrupted. I can print the values out at the top of the function, and the...

How do I put an array on the POE heap and push or pop data?

How do I put an array on the POE heap, and push/pop data to/from it? I'm trying to put the following array on the heap: @commands = ( ["quit",\&Harlie::Commands::do_quit,10], ["part",\&Harlie::Commands::do_part,10], ["join",\&Harlie::Commands::do_join,10], ["nick",\&Harlie::Commands::do_nick,10], ["module",\&Harlie:...

Heaps vs. Binary Trees - How to implement?

when implementing a heap structure, we can store the data in an array such that the children of the node at position i are at position 2i and 2i+1. my question is, why dont we use an array to represent binary search trees and instead we deal with pointers etc.? thanks ...

c# structs/classes stack/heap control?

hi! so in c++ it's very easy. you want whatever class/struct to be allocated on the heap, use new. if you want it on the stack, don't use new. in C# we always use the new keyword, and depending on whether it's a struct or a class it's allocated either on the stack or on the heap (structs go to the stack, classes to the heap) - and in s...

Java heap size in JMP

I'm trying to profile a simple application in java, which basically only opens an RMI interface and waits for messages. When I open the application via TIJMP, it reports from the start: Heap: init - 0, used - 3MB, commited - 7MB, max - 643MB. Now I'm pretty sure that simply starting the program didn't push the memory requirement over 6...

Can a C++ class determine whether it's on the stack or heap?

I have class Foo { .... } Is there a way for Foo to be able to separate out: function blah() { Foo foo; // on the stack } and function blah() { Foo foo* = new Foo(); // on the heap } I want Foo to be able to do different things depending on whether it's allocated on the Stack or the Heap. Edit: Alof of people have asked m...

"Java heap space" error when deploying WAR with ant on Weblogic 10.3

I'm getting this error when deploying application WAR files from my ant build via a task that calls weblogic.Deployer. This is on Windows XP, server is not in Production mode, there are only 2 other WARs installed on the server, one being just static content (web.xml + png/css/javascript files), no other weblogic servers installed on th...

Recommendations for a heap analysis tool for Java?

List your favorite heap analysis tools (e.g. jprofiler, jmap, ...). Let's keep it one tool per answer, with a short list of pros and cons for each tool. ...

Program stack and heap, how it works?

Hi, I know that every running process has pages associated with it in virtual memory and few of them will be loaded into main memory as required. I also know that program will have a stack and also a heap to allocate dynamic memory. Here are my questions. Is stack also part of some page in main memory? What happens when the program is...

Young , Tenured and Perm generation

I'm confused with Heap,Young,Tenured and Perm generation. Could anyone please explain? ...

How to increase java heap size programmatically

I have a java desktop application for searching files and it is usually reaching the default heap limit pretty soon. I wont have access to all the systems it will be installed in so I want to increase the JVM heap size in the application itself. Can anybody help me how can I do that programmatically in my application ...

Given a pointer, how might I find the _HEAP_ENTRY that it belongs to?

I'm learning to use WinDbg and I might be way off track on this, but I assume that if my program isn't using a paged heap that instead of _DPH_HEAP_BLOCK structures that "own" a pointer to my allocation, I would instead have a _HEAP_ENTRY for the allocated data. Given an address to allocated data on the heap, how might I find which _HEA...

Max memory for 64bit Java

Hi, What's the maximum amount of heap space that one can allocate for java on a 64-bit platform? Is it unlimited? Regards, Raymond Barlow ...

Can Win32 "move" heap-allocated memory?

I have a .NET/native C++ application. Currently, the C++ code allocates memory on the default heap which persists for the life of the application. Basically, functions/commands are executed in the C++ which results in allocation/modification of the current persistent memory. I am investigating an approach for cancelling one of these f...

What is max heap size I can allocate for JVM on Win32 machine ?

I have BEA JRockit JDK 5.0 Update 6 running on Windows XP. I wish to know what is the max heap I can allocate when I have primary memory of 4GB on my machine. ...

Why is the maximum size of the Java heap fixed?

It is not possible to increase the maximum size of Java's heap after the VM has started. What are the technical reasons for this? Do the garbage collection algorithms depend on having a fixed amount of memory to work with? Or is it for security reasons, to prevent a Java application from DOS'ing other applications on the system by con...

Bash variable expansion causes Java commandline to break

I've been experiencing a strange issue the last couple of days while writing a shell script which executes Java (starting the JBoss AS). I have a variable JAVA_OPTS that I am creating, and finally passing to the 'java' command. When I hard code the values in JAVA_OPTS rather than using variable expansion, the java process executes normal...

HeapAlloc returns 0xC0000017: Not Enough Quota

I'm allocating a small number of data types, total size 2mb. I only use one heap, and it runs fine until I get to a certain number of allocations, I'm pretty sure of this because I've commented one allocation for it to crash on the next. Quota = disk space? the documentation doesn't cover error codes for this specific function, I've pr...

How to record every allocations and deallocations of memory on a program?

I want to see is fragmentation the reason of increasing memory usage of my twisted server. I have posted a question here: How to find the source of increasing memory usage of a twisted server? Now, what I am going to do is to visualize the heap. I found an article: Memory fragmentation. The figure of heap in that article is something ju...