6,675 questions
0
votes
0
answers
76
views
Java heap space - even only 1.5Gb of 5.8 used
Why am i getting java.lang.OutOfMemoryError: Java heap space even when i have a plenty of memory.
So my simple code that create dataframe from input data, so no really data processing in spark - only ...
0
votes
2
answers
165
views
What is the difference between the Heap size and the Private Bytes size?
I have a .Net 4.7 application (WPF) whose memory consumption increases to 5.785 GB in private bytes, but the heap bytes are 4.260 GB, as shown in the figure taken by Process-Explorer:
If I run GC ...
2
votes
3
answers
258
views
How to detect whether a variable is allocated on the stack or the heap in C?
I’m working on a C project where I need to know if a pointer refers to memory allocated on the stack or the heap.
For example:
int x = 42; // stack variable
int *y = malloc(sizeof(...
1
vote
1
answer
183
views
How does C prevent heap growing indefinitely?
I’m investigating how C’s runtime memory allocator behaves in a long-running process that repeatedly:
allocates many blocks of variable size with malloc(),
finishes its work, and
calls free() on all ...
0
votes
1
answer
94
views
Spring boot multi-module gradle project - integration tests throwing java.lang.outOfMemory error
I have a big Spring Boot aplication composed of multiple micro services using Gradle buildSrc. It contains a lot of tests seperated into seperate tasks (unit, integration, acceptance...).
These tests ...
-1
votes
1
answer
147
views
Heap Corruption happening while delete[] for partially allocated array
I had a heap corruption error recently which I solved but cannot understand what is happening
I am allocating memory for a DBL array,
new DBL[length+1]; // where length = 1000;
Later I am writing ...
0
votes
0
answers
104
views
Why does an in-scope object show as "dead" in Visual Studio when doing a heap snapshot?
I have this sample program:
Program.cs:
internal class Program
{
private static void Main(string[] args)
{
var testObject = new ZZTest();
Console.ReadLine();
Console....
0
votes
0
answers
55
views
Java stream row not getting cleared from heap space
OutOfMemoryError while streaming 20M+ rows in Spring Boot with Hibernate
Issue
I’m streaming 20M+ rows from my Content table using a Stream<Object[]> in Spring Boot with Hibernate. However, I ...
0
votes
1
answer
60
views
windbg heap memory mismatch vs total memory of individual addresses
I'm m debugging a .Net process for a possible memory leak.
The command !address -summary shows:
0:000> !address -summary
--- Usage Summary ---------------- RgnCount ----------- Total Size -------- ...
0
votes
0
answers
116
views
Heap Memory Stair-Case rising in SwiftUI project
A simple keyboard extension app showing continuous heap memory allocation each time open the keyboard on screen.
For easier understanding see the image below...
Here is the KeyboardViewController:
...
-1
votes
1
answer
54
views
How to reduce heap space utilization when working with a list PDF documents?
I have a microservice that generates multiple PDF Documents and saves to database. For generating each document, from the main service class, I call multiple document specific service class methods by ...
1
vote
1
answer
202
views
Strange garbage collection behaviour leads to server performance degradation
Background to the Application:
We have a Java WebApp on a Tomcat Server for multiple users. We have 30+ customers servers running.
Problem:
On one particular customer we run into a strange phenomenon ...
1
vote
0
answers
44
views
Not able to merge free blocks together in my simple, custom, memory allocator
I am trying to implement a simple memory allocator. Essentially trying to copy the function malloc() and free(void *ptr) in C.
I initialize a region of memory using sbrk(). In my custom malloc ...
0
votes
0
answers
25
views
Node.js: Application crashing with ‘Heap Out of Memory’ error
What are the best practices and tools for performing a memory profile on a React.js frontend and a Strapi backend application? How can I identify memory leaks, optimize memory usage, and ensure ...
0
votes
0
answers
42
views
How to fix every allocation in debugging?
I have an app written in C++ (Windows) which also used some third party libraries. In the app there are many news/deletes together with mallocs and frees. Now I met with a bug that some data on the ...
1
vote
0
answers
212
views
Springboot scheduled application increasing memory in docker
I have a springboot microservice (updated to spring-boot-starter-parent 3.4.0) that is run on a schedule every 5 minutes that checks a database table (oracle jdbc driver 19.20.0.0) for new task ...
2
votes
2
answers
84
views
Struct with fields of List type, but set to null: Heap allocation?
Consider a struct like this:
struct ExampleStruct
{
public int ID;
public List<ExampleStruct> children;
}
Would the following line of code create an object on the heap?
ExampleStruct ...
0
votes
1
answer
85
views
Valgrind Invalid read write for all instance variables of the class
I have a class which have certain instance variables. I am getting random crashes when i run my application. Thinking memory corruption, I ran the application under valgrind, and I am able to narrow ...
2
votes
4
answers
476
views
How to make shared pointer from raw pointer and make other shared pointers aware of it?
I have some hierarchy (through composition, not inheritance) of classes: Child and Parent. Child can have multiple parents, also Parent could do the same. I want the Child class lifetime being managed ...
0
votes
0
answers
188
views
OutOfMemoryError when resizing large images using Thumbnails in Java (Heap Size Limitation)
I'm encountering a java.lang.OutOfMemoryError when trying to resize large images using the Thumbnailator Dependency in Springboot. My heap size is limited to -Xms256m -Xmx512m, and I believe the issue ...
1
vote
4
answers
160
views
Why can the stack collide with the heap if they are located in a virtual space that is very large in size?
If each process has its own address space and it is much larger than the physical memory of the computer, why can’t we just place the stack at the end of this address space and the heap at the ...
0
votes
0
answers
95
views
Memory issues in kafka
During Kafka's work, we noticed that the Garbage Collector was freeing up less and less memory.
memory leak
We are using a kafka cluster with three brokers with the following settings:
POD_NAME: ...
0
votes
1
answer
149
views
Cannot memory-free strings from arbitrary-length array of strings
I want to write a function that will read a text file, and return its lines as an array of strings for further processing.
To this end, I am trying to get my head around correctly handling an N-length ...
0
votes
1
answer
48
views
/proc/$pid/statm application reports on x86_64 (amd64) 4 times more mapped pages as same application on arm64 (aarch64)
We have a C++ multi-threaded application with shared libraries, running on linux x86_64 (debian-12, kernel 6.1.xx) and on a raspberry pi 5 ( arm64, debian-12, kernel 6.3.xx ). If I lock at /proc/$pid/...
0
votes
1
answer
91
views
What's the flexibility in concrete types mentioned by Bjarne Stroustroup?
In Chapter 5.2 of the 3rd edition of A Tour of C++, Bjarne write this about concrete types. What I don't understand is what the flexibility is.
Is he referring to the use of pointers in concrete ...