I get this error poping up here and there but I still don't know what it means and how to fix it. "Windows has triggered a breakpoint in program_name.exe. This may be due to a corruption of the heap, which indicates a bug in program_name.exe or any of the DLLs it has loaded. This may also be due to the user pressing F12 while program_name.exe has focus. The output window may have more diagnostic information."

Member Avatar
Member Avatar
+0 forum 5

Hi All,We have a java application which does deal with lots of insert,update and select statement.We are using bonecp. So we took some sample heap and analyse it with MAT and its pointing to jdbc leaking. Thus we went into the codes and ensure that all resultset,statement and connection are closed accordingly. Below is the sample of the donimator tree which is pointing to lots of java.util.HashMap. What could help to exactly the identify the correct problem? Class Name | Shallow Heap | Retained Heap | Percentage -------------------------------------------------------------------------------------------------------------------------------- | | | com.mysql.jdbc.JDBC4Connection @ 0xf016d728 | 1,120 | 1,467,296 | 6.22% …

Member Avatar
Member Avatar
+0 forum 33

Can any one tell me about fibonacci heap? I have read that it can be implemented using prims algorithm. but i actual i do not know what is fibonacci heap So can any one tell me what is fibonacci heap? how to implement fibonacci heap? what are the applications of fibonacci heap? and some more content on fibonacci heap which make me comfortable to know about it?

Member Avatar
Member Avatar
+0 forum 1

We started learning Heap property in class. Here is an exercise on the topic: > isHeap > Write the definition of a function named isHeap that receives three arguments as follows: > x : an array of ints > i : a valid index into the array x > n : the number of elements in the array x > > The function returns true if the HEAP property holds among the array elements x[i]...x[n-1] , and false otherwise. The HEAP property is simply that for every value of j between i and n-1 , x[j] is not less than …

Member Avatar
Member Avatar
+0 forum 5

i am doing a group project concerning graph my part is finding the minimal cost the teacher tried to help us out with the group work by putting up code for the parts for use to follow. i have errors when i compiled the code that the teacher give. the error is with followPath it said that the method followPath int is not declared with type Graph. no matter what i did to fix it it did not work so i need help plus she said it needed modification but it due in another day and since i am still …

Member Avatar
Member Avatar
+0 forum 3

If a heap is like a binary search tree shouldn't it search in O(log n)?

Member Avatar
Member Avatar
+0 forum 1

**Hello, If I have an array, and want to make a heap tree out of it using make heap and sort heap, how would I do it? I'm struggling because I didn't take any course in data structure. Any help -in c++- will be appreciated :D**

Member Avatar
Member Avatar
+0 forum 6

Hello I am currently working on this code and the code can be runned well from 100-10,000 random elements after that the heap sort says stack over flow, im thinking the recursive calls are the cause of this, so please healp public static void MAX_HEAPIFY(int [] A, int i, int n) { int l = i + 1;//sets the left tree root int r = i + 2;//sets the right tree root int largest = 0; if(l <= n && A[l] > A[i]) { largest = l; } else { largest = i; } if(r <= n && A[r] > …

Member Avatar
Member Avatar
+0 forum 3

Hi. Sooner or later I had to go into the depths of C. Today was the day I tried my first things with C. However, I am having a problem although I do not know what actually causes it. The goal of the pogram is to combine the parameters into one char array, instead of having an array of char arrays. Eventually it needs to call another exe, in which it will measure the time it needs to execute (not implemented yet). The problem is that the program always ends with an error, while the program does its job so …

Member Avatar
Member Avatar
+0 forum 3

Hey, I'm studying for a final exam and I came across an old question asking to give an algorithm that runs in [TEX]O(logn)[/TEX] and deletes an arbitrary element from an [TEX]n[/TEX] element [B]Min-Heap[/B] if given its index. I was thinking the right approach would be to use Hash table for direct access in [TEX]O(1)[/TEX] time and then delete the element in [TEX]O(logn)[/TEX] time and maintaining the heap property. I don't really know how to go about writing an algorithm that does this though, so any help would be really appreciated. Thanks

Member Avatar
Member Avatar
+0 forum 10

Hi, I am facing OutOfMemory exception in Java, Kindly help me to resolve this issue, really appreciate your help [U][B]ERROR: [/B][/U]java.lang.OutOfMemoryError: Java heap space [B][U]CODE:[/U][/B] [CODE] public Blob getBlob(String databaseInstance, InputStream inputStream) throws SQLException, Exception { applog.info("Entering getBlob"); InputStream stream = null; applog.info("inputStream : " + inputStream); stream = inputStream; applog.info("stream : " + stream); byte[] tmp = new byte[50000000]; byte[] blobValue = null; int sz, len = 0; while ((sz = stream.read(tmp)) != -1) { if (blobValue == null) { len = sz; blobValue = tmp; } else { byte[] narr; int nlen; nlen = len + sz; narr …

Member Avatar
Member Avatar
+0 forum 4

We have to do a level order traversal of a max-heap and I'm having some trouble. Of course a regular level order traversal in a heap is easy as can be (it's an array of course) but now I have to print it in a sort of tree structure. For example if I have a heap with the following values [9, 5, 6, 4, 3, 2] I have to print it as follows: 9 5 6 4 3 2 Right now here's my code for a simple level order: [ICODE]template<class ItemType> void BinaryHeap<ItemType>::PrintLevel(ostream &out) { out << endl; for(int i=1; …

Member Avatar
Member Avatar
+0 forum 1

Hello, everyone!:) I am new to Daniweb and I would like a little help in implementing Binomial Heap subroutines in C, especially insertion in Heap. For my application it is necessary to implement max-heaps(i.e., roots storing the maximum value) in stead of min-heaps(i.e., root storing minimum value) in ANSI C. I have written a few subroutines - but things are not working properly. I will explain my codes here with code snippet and my problem. [CODE=C] struct _tnode{ int key;//a fi eld key for its key int degree;/*a fi eld degree for the number of children -or for the degree …

Member Avatar
+0 forum 0

Hey guys I've been asked to create an array of objects on the heap for my assignment but I cant seem to find any examples that explain it well enough on the web. So what I got is: [CODE]//Heabder File class Wheel{ public: Wheel() : pressure(32) { ptrSize = new int(30); } Wheel(int s, int p) : pressure(p) { ptrSize = new int(s); } ~Wheel() { delete ptrSize; } void pump(int amount) { pressure += amount; } private: int *ptrSize; int pressure; }; [/CODE] Ok so thats the wheel class and I have to coppy the objects into my "RacingCar" …

Member Avatar
Member Avatar
+0 forum 5

So here's the question: Suppose as min heap uses parent pointers such that each node contains a pointer to its parent and the root has a null pointer. Given a pointer to the node, which isn't the root of the tree, containing the max key in the heap, what is the complexity for deletion? The answer is O(1) but this doesn't make sense to me. Because heaps are always balanced you can't replace the deleted node with an adjacent node you have to scale the length of the tree O(log N) to find the last entered node in the tree, …

Member Avatar
Member Avatar
+0 forum 4

Hey guys.. thanks in advance for whosoever helps and gives their views.. So I am facing some problems with my CS program... which is in c++ and is about heaps.. its pretty basic stuff.. [B]Here's the Heap.cpp (implementation file)[/B] [ICODE]/** @file Heap.cpp */ #include "Heap.h" // header file for class Heap Heap::Heap() : size(0) { } // end default constructor Heap::~Heap() { } // end destructor bool Heap::heapIsEmpty() const { return bool(size == 0); } // end heapIsEmpty void Heap::heapInsert(const HeapItemType& newItem) // Method: Inserts the new item after the last item in the // heap and trickles it up …

Member Avatar
Member Avatar
+0 forum 3

Hi Guys, Is this right to say Heap is RAM and Stack is Pagefile(HardDrive)? Sorry for silly question. :?:

Member Avatar
Member Avatar
+0 forum 2

The End.