Questions tagged [heap-memory]
The heap is process memory set aside for dynamic allocation.
heap-memory
6,648
questions
0
votes
0
answers
57
views
How can I have a local Array in each struct?
My code uses a ref struct to parse some data from a file. I took some inspiration from the Utf8JsonReader that uses the same approach. It's a struct that can be duplicated to read in different ...
1
vote
1
answer
50
views
What would prevent java garbage collection from cleaning heap?
Two k8s pods running the same image (using Adoptium 17 JRE).
Around 9pm, they start getting requests and objects are getting created.
On the blue pod, we can see the garbage collection working ...
0
votes
0
answers
30
views
Getting heap storage with proper alignment in C++ for overaligned type
In some use case, you'll need to allocate storage before creating objects inside this storage.
Then in order to create these objects, you may need to use placement new:
T *pobj = new(pstorage);
yet ...
-1
votes
1
answer
61
views
Getting heap storage with proper alignment in C++ for non-overaligned type
In some use case, you'll need to allocate storage before creating objects inside this storage.
Then in order to create these objects, you may need to use placement new:
T *pobj = new(pstorage);
yet ...
0
votes
1
answer
43
views
Twostate predicate cannot prove parameter is allocated
Inside of a loop after an array of booleans have been allocated, the invariant allocated(sieve) reports true however, attempting to assert the Preserved predicate on the sieve array after an ...
0
votes
0
answers
36
views
Can a kernel memory address indicate its type of allocation?
I'm troubleshooting some Linux kernel code, and it would be nice to know where the memory pointer allocation originated.
Question: Are there Linux kernel macros available like ADDR_IS_STACK_ADDR(ptr) ...
-2
votes
0
answers
7
views
sir my electon project run but make build in earror occurs javascript heap memory errors
my project is a block coding program frok from open block desktop with a repository size of around 10 GB and makes build not build and error accord javascript heap memory. javascript heap memory ...
0
votes
1
answer
59
views
LLVM Analyzer Garbage value
I work on a custom container and I manually allocate some heap memory:
template<typename element_type>
class MyClass{
element_type* m_data = nullptr;
std::size_t rows, columns; // assume ...
0
votes
1
answer
35
views
How to know heap overflow point?
I'm attempting to write a program that determines all palindrome within a given range. My program calls a function (number of digits) that returns the size of an integer (ie. 400 would be 3 as it has ...
-2
votes
0
answers
51
views
c++ heap vs stack allocation for append function call [duplicate]
If I have a string in C++:
std:string a = std:string("haha");
Does it get allocated on the stack since it's a local variable? Or since it's the std::string type, does it directly go on the ...
-1
votes
0
answers
33
views
Getting Out of Memory error message while doing execution
I am doing performance execution and have Gatling project which is combined with these (Intellij+ Maven+ Java).
When we start execution after some time let say 20sec getting out of memory error ...
0
votes
0
answers
84
views
What is a proper way to initialize object on stack or on heap?
tl;dr; What is a proper way to initialize object on stack or on heap?
I want to make a profiling tool that can track time for iterative purposes and for single measurements - so that I can use same ...
1
vote
2
answers
164
views
C free() on Ubuntu VM, a question regarding heap memory
A simple program to allocate and free heap memory:
int main(int argc, char **argv) {
char *b1, *b2, *b3, *b4, *b_large;
b1 = malloc(8);
memset(b1, 0xaa, 8);
b2= malloc(16);
memset(...
2
votes
0
answers
50
views
Build wasm with import memory wasm
I want to write code in rust which I will then compile into wasm so that it uses import memory.
In the compiled file the wasm from rust want to see similar code
(module
(import "host" &...
-3
votes
2
answers
63
views
Define/Initialize Vectors on Stack vs Heap [closed]
I declare two vectors in my class header file as follows:
struct MYDATA
{
uint8_t A = 0;
uint8_t B = 0;
};
std::vector<MYDATA> vector1;
std::vector<MYDATA> *vector2 = new std::...