Top "Heap" questions

A heap (data structure) is a tree that is ordered with respect to depth.

Do (statically linked) DLLs use a different heap than the main program?

I'm new to Windows programming and I've just "lost" two hours hunting a bug which everyone seems aware of: you …

windows linux dll heap heap-corruption
max heap and insertion

I have the an integer array of size 10. I need to draw the complete binary tree which I did. Now …

algorithm data-structures heap binary-tree max-heap
Python: Update value of element in heapq

If I have a heapq which contains some elements like: import heapq class Element(object): def __init__(self, name, val): …

python python-2.7 queue heap priority-queue
When should I use make_heap vs. Priority Queue?

I have a vector that I want to use to create a heap. I'm not sure if I should use …

c++ heap priority-queue
How to implement a memory heap

Wasn't exactly sure how to phrase the title, but the question is: I've heard of programmers allocating a large section …

c++ c memory heap allocation
When is array allocated on stack in c#?

I've been trying to figure out when things get allocated on stack and I can't figure out how would you …

c# arrays stack heap allocation
What does "retained size" mean in jVisualVM's memory inspector?

Jvisualvm heap dump on summary tab has functionality to inspect bigest objects by retained size. What does retained really mean? …

java profiling heap jvisualvm
Removing elements from heap

I made a heap. I am curious if there's something subtley wrong with my remove function: int Heap::remove() { if (…

c++ algorithm data-structures heap heapsort
ASAN heap use after free

I am running ASAN for finding memory leaks in a very big project. I have found out the cause, but …

c malloc heap free address-sanitizer
Dijkstra algorithm. Min heap as a min-priority queue

I'm reading about Dijkstra's algorithm in CLRS, Third Edition (p. 662). Here is a part from the book I don't understand: …

heap priority-queue dijkstra min-heap