Skip to main content

Questions tagged [heap]

1 vote
3 answers
380 views

What is the standard for heap allocation systems in bare metal programs? If there is no standard, what is the most popular one? Is it a free list? If so, are there heuristics that use a hash table of ...
nicholasbelotserkovskiy's user avatar
1 vote
0 answers
466 views

I am writing a compiler in C++ 20. I am looking for ways to improve heap memory performance. For example, I can compile a 36.8 MB source file that is just many repeating lines of: let x0: string = &...
Wesley Jones's user avatar
-2 votes
2 answers
303 views

Prelude Recently, I helped a friend of mine in coding him a problem for his university Algorithms course, where problems are submitted in Java. I sent him code with good O notation complexity, ...
blonded04's user avatar
  • 105
0 votes
0 answers
102 views

Wikipedia says "increase key" is O(log n) for a binary heap, but it is referring to an internal function. I'm not asking about that: Imagine the data structure had an external/public ...
Daniel Kaplan's user avatar
2 votes
4 answers
926 views

Is it possible in theory to have a programming language that allows for object lifetimes that exist beyond the current scope but without using heap? As a little background, in embedded development it ...
Jeff's user avatar
  • 139
6 votes
2 answers
2k views

I'm going through some code from this article about ECS-systems in game programming and trying to understand it, and something I'm seeing a lot is using heap memory in places where it seems like ...
JensB's user avatar
  • 277
4 votes
1 answer
3k views

Recently, at the organization I work for, we've been using a static code inspection tool. One of the more interesting findings is that private information, such as passwords, may be stored in the heap ...
Vivian River's user avatar
  • 2,417
2 votes
2 answers
2k views

I am studying the heap sort algorithm from the book Introduction to Algorithms by Thomas H. Corman. It differentiates between the length of the array, A.length, as "the number of elements in the ...
jiggling_electrons's user avatar
2 votes
5 answers
6k views

Computer Systems: a Programmer's Perspective says: 12.4.2 Mapping Variables to Memory Variables in threaded C programs are mapped to virtual memory according to their storage classes: Global ...
Tim's user avatar
  • 5,565
0 votes
1 answer
181 views

For reference, I am reading from "Game Engine Architecture 2nd Edition" by Jason Gregory. Although I understand the theory behind Stack Allocators, I am having trouble implementing it fully. ...
Ameer Abdallah's user avatar
25 votes
3 answers
4k views

In languages such as C or Java we have the concepts of the Stack and the Heap. Are these abstractions the particular language runtime/compiler creates over the plain-old RAM? Or are these concepts ...
Aviv Cohn's user avatar
  • 21.6k
0 votes
4 answers
9k views

I'm in a discussion with a co-worker concerning the use of structs. I have a couple of structs that contain several static properties that are used throughout our website. The value of those ...
Necromancer's user avatar
1 vote
2 answers
2k views

I was in #Qt irc channel, and I showed a small snippet of my code in a style that I heavily rely upon. It looks like this: /* Get Reply from Server */ QPointer<QNetworkReply> reply; { ...
Anon's user avatar
  • 3,649
-1 votes
1 answer
158 views

Right now I am collecting memory information on a node.js server every 100 seconds. I want do display the memory usage info as a graph on the front end. const mem = { heapTotals: [], heapUseds: []...
user avatar
4 votes
1 answer
961 views

Let's say we have a struct Vector2i { int x = 0, int y = 0 }; And create a Pointer to it via Vector2i* pointer = new Vector2i; Where would int x and int y be stored? Heap or stack? Are all members ...
Farrrbi's user avatar
  • 51

15 30 50 per page