Skip to main content
How are we doing? Please help us improve Stack Overflow. Take our short survey
Filter by
Sorted by
Tagged with
2 votes
1 answer
80 views

I have a Python function that consumes a large amount of memory. When the function finishes, I want to release the memory and return the freed pages to the operating system by calling malloc_trim(0). ...
pixeldrift's user avatar
24 votes
2 answers
2k views

In JavaScript, when you do something like this, function connect() { var ws = new WebSocket(url); ws.onmessage = function(e) { window.alert(e.data); }; } it will work. But why ...
Maestro's user avatar
  • 9,876
0 votes
2 answers
170 views

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 ...
james james's user avatar
0 votes
1 answer
152 views

I am currently working on a .NET 9 WinForms program that contains an ImageViewer, which is a seperate window where you can scroll through a series of images. My problem is that even after closing the ...
Joelbu's user avatar
  • 144
2 votes
1 answer
171 views

In the following JavaScript, does the object destructuring that follows the creation of target create a new (temporary) object that has to be garbage collected? In other words, are there two objects ...
user3163495's user avatar
  • 3,968
1 vote
1 answer
81 views

This question tries to collect the full picture if/when a stale object reference can happen from an old-gen (immutable) array referring a newer-gen object, from fragments of information. Preface: was ...
ron's user avatar
  • 9,458
0 votes
0 answers
47 views

I am using h2o-3 java repo to load this frame but have been running into memory issues with constant GC pressure. The actual frame size is 3.31 GB as per h2o logs, but the peak JVM usage comes to be ...
Monil Patel's user avatar
2 votes
1 answer
89 views

I have some code similar to this: class Foo { var x = 0 init { GlobalScope.launch { while (true) { delay(1000) x += 1 }...
Seggan's user avatar
  • 216
2 votes
1 answer
176 views

I am trying to do some linear algebra in Kotlin/JVM and I have two ways of doing it: Using Apache commons-math, which implements matrix multiplication purely on the JVM Using OpenCV's Mat class and ...
vatbub's user avatar
  • 3,196
0 votes
2 answers
108 views

My company is finally starting to introduce unit tests. While going through some of the new tests, I came across this one: [Test] public void GetCorrectTimeoutInfoFromTimeSpan() { // Arrange ...
MaxH's user avatar
  • 75
2 votes
2 answers
577 views

I am performing operations on a directed acyclic graph (DAG) of DataFrames using Polars (eager API). Here’s a simplified example of my workflow: Read parquet files into df1. Use df1 to create df2 and ...
Deep Ghodasara's user avatar
1 vote
1 answer
59 views

I'm looking for some code or some benchmark to roughly asses the pause times or cpu load caused by some GC in order to get some rough estimate how efficient it is. I just want to see whether some GC ...
OlliP's user avatar
  • 1,607
1 vote
0 answers
96 views

I'm trying to migrate our application from .NET Framework to .NET Core. In one of our tests, an object of type ZWebBrowser : System.Windows.Forms.WebBrowser is not garbage collected correctly, due to ...
VEvergarden's user avatar
1 vote
2 answers
95 views

I'm calling global.gc() in some unit tests, but for some reason it only seems to have any impact when called synchronously. If I call it asynchronously, I never seem to get a cleanup callback in my ...
lucas's user avatar
  • 2,055
0 votes
1 answer
150 views

I am seeing the below in the GC log before the JVM pauses for several minutes after which it gets restarted externally. [2025-07-18T18:08:42.605-0600][info][gc,metaspace,freelist,oom] Metaspace (data) ...
lmk's user avatar
  • 778
3 votes
0 answers
140 views

I have recently experienced major crashes on my computer after executing some Python code of mine. My PC would freeze and sometimes show a bluescreen after a few rounds of a seemingly unproblematic ...
Octavius's user avatar
  • 139
0 votes
1 answer
105 views

I'm working with a Vue 3 component that plays videos using the native tag. I dynamically change the src of the video based on a prop (videoName) and I need to avoid memory leaks. Despite cleaning up ...
Arian B's user avatar
  • 79
1 vote
1 answer
131 views

We are trying to implement memory leak regression tests. For this it would be very useful to have a deterministic garbage collector that takes as much time as needed, but collects everything that is ...
Reto Höhener's user avatar
0 votes
1 answer
178 views

I'm trying to fine tune performance/memory usage of a ASP.NET 4.8 web application in IIS. I did all the measurements and determined that I'd like to sacrifice a bit of performance for lower memory ...
Heinzi's user avatar
  • 173k
1 vote
2 answers
130 views

I've seen some similar posts, but I did not found a exact answer. So please remember that this question is about root marks and read barriers. For garbage collectors, such as ZGC, the Mark phase still ...
Sen Napbad's user avatar
0 votes
0 answers
38 views

I am running a .NET 8 application inside a Linux container on Kubernetes and monitoring it with Grafana. The pod has a memory request and limit set to 256 MiB. I see that the memory is at 90+ percent ...
qkhanhpro's user avatar
  • 5,350
0 votes
1 answer
57 views

Must I call Dispose when I'm done with a DependentHandle? Or will the resources get cleaned up at the next garbage collection? (Is the InternalFree call essential, to notify the GC that the handle is ...
Benjamin Hodgson's user avatar
0 votes
0 answers
23 views

I am debugging performance issues with a live application running on AWS Fargate. I've collected CPU profiling data using the inspector by connecting to a live instance. I've also collected ...
moltar's user avatar
  • 1,841
0 votes
0 answers
53 views

We have a java app that runs on openjdk version "11.0.18" 2023-01-17 LTS and it started swapping for a few weeks. When running jcmd <PID> VM.native_memory, we get something like this: ...
Eugene's user avatar
  • 122k
1 vote
1 answer
69 views

I'm running a Python script on a VPS in a continuous loop. The script fetches stock data with yfinance, then trains a new TensorFlow/Keras model for each stock. Problem: The process's RAM usage ...
teamPT's user avatar
  • 11
1 vote
2 answers
95 views

I am using np.delete(), to drop a specific band from my ndarray. However, while profiling the memory usage with memory profiler, I noticed that after using np.delete, the memory usage doubles, even ...
rsaw's user avatar
  • 144
4 votes
1 answer
145 views

I am trying to use weak pointers introduced in go1.24 to build a system in which weak pointers can be passed as interfaces. The problem is that weak.Pointer doesn't follow the same interface as the ...
Vladimir Vislovich's user avatar
3 votes
1 answer
106 views

I'm receiving data over UDP in a C# application, using socket.ReceiveFrom calls: byte[] buffer = new byte[1024]; EndPoint remoteEndPoint; ... int byteCount = socket.ReceiveFrom(buffer, SocketFlags....
Dogtanian's user avatar
1 vote
1 answer
369 views

Recently, I have added.net NativeAOT support to the local embedding mode of the client and in-memory database of the AutoCSer RPC framework I developed. Originally, it was expected that the AOT mode ...
Jin Xiao's user avatar
1 vote
1 answer
90 views

I am having trouble protecting a buffer from being garbage collected while using my own MPI bindings in Julia. In particular I am using this function: function Recv(buf::Ref{T}, count::C_int, datatype:...
jorge ezpeleta's user avatar
2 votes
0 answers
73 views

I'm trying to interpret the following output of the jstat command: $ jstat -gcoldcapacity 57208 OGCMN OGCMX OGC OC YGC FGC FGCT CGC CGCT GCT ...
Basilevs's user avatar
  • 24.6k
2 votes
0 answers
84 views

I'm working with complex data structures involving custom classes that reference each other. I’m aware that Python uses reference counting, but also has a cyclic garbage collector for circular ...
0xMohamed's user avatar
2 votes
1 answer
157 views

I have a server which has 2 PHP scripts that run continuously in the background. One of those scripts, for some reason, is not releasing memory and it's making the other script fail because eventually ...
Sitepor500.com.br's user avatar
-1 votes
1 answer
157 views

Whether it is G1, ZGC or SGC, it seems that GC can only be triggered when the allocation of a new object fails. If I do not allocate objects, then my space will always be occupied, even if my system ...
liudaolunhuiboluo's user avatar
0 votes
0 answers
66 views

I am maintaining Professor David Turner's interpreter for Miranda and it now works on aarch, amd, arm, chrp, evbarm, loongarch, mips, powerpc, riscv and x86, 32-bit and 64-bit, big-endian and little-...
martinwguy's user avatar
1 vote
4 answers
149 views

I've been reading an article about memory management in JavaScript, and it says that the global scope objects don't get cleaned from the memory. If a global variable is not being referenced anywhere ...
Abdulrahman Ismael's user avatar
2 votes
0 answers
262 views

We have a large app written in C# (a multiplayer game) with around 10 million objects on the heap. However, the effect described in this question can be observed even in a simple test app with a ...
radfast's user avatar
  • 598
2 votes
0 answers
55 views

Am I required to hold ref to HTMLImageElement to prevent it from being gc'ed befor its load/error events will be fired? for example: /** * @param { string[] } urls * @returns { Promise<...
vanilla's user avatar
  • 145
0 votes
1 answer
98 views

Suppose I have objects A and B which strong/regular reference each others, forming a reference cycle. The path from A to the GC root is dominated by a weak reference (represented by the dashed arrow ...
sqd's user avatar
  • 1,554
0 votes
2 answers
88 views

Considering this .net standard 2.1 compliant code public unsafe struct CharacterStorage { public const int Capacity = 20; fixed char Characters[Capacity]; public Span<char> GetSpan(...
Moe Baker's user avatar
  • 369
1 vote
0 answers
22 views

Send or SendAsync return HttpResponseMessage, which implements IDisposable in order to cleanup the HttpContent stream, from what I know. Why doesn't CA2000 flag undisposed instances of the response ...
Alex's user avatar
  • 913
0 votes
1 answer
97 views

I need to change a default garbage collector in Payara server(version 2025, jdk 21) docker image. I tried either preboot or postboot commands with configuration below, still not changing. These are ...
PeterL355's user avatar
0 votes
0 answers
33 views

When I run this script, the task manager shows that when the cache list if full the program uses around 2GB and when popping all elements it goes down to about 20MB. But, if the surfaces are 255 by ...
greenKac's user avatar
0 votes
0 answers
23 views

C# Program is running A thread. A Thread is using ThreadSleep(1) during a while statement iteration. Of course, I set TimeBeginPeriod to 1. On average, one cycle is completed after 3-5ms, but ...
user30001231's user avatar
0 votes
1 answer
100 views

Given this code in the dispose-pattern from msdn public class DisposableResourceHolder : IDisposable { private SafeHandle resource; // handle to a resource public DisposableResourceHolder() {...
meJustAndrew's user avatar
  • 6,769
0 votes
3 answers
142 views

Is it wrong to declare simple variables like int, double, bool, var, String, List inside callback function? (Which is generally nested within the build method.) For, example, I have a ...
rusty's user avatar
  • 1,231
0 votes
0 answers
141 views

I am encountering an issue where memory is not being released back to the OS, even after clearing large in-memory tables and running .Q.gc[]. Despite multiple attempts, the process continues to ...
pmade1's user avatar
  • 21
0 votes
0 answers
42 views

I have following Python2 function in a big Python-Cython project (print statements added for debugging): import gc def e_closure (startstate): """Return all states reachable from ...
Sourav Kannantha B's user avatar
1 vote
1 answer
65 views

I have an API that returns handles to background processes. These handles themselves have some threads as instance variables. I want to avoid forcing the user to call an explicit cleanup method to ...
meisel's user avatar
  • 2,615
0 votes
0 answers
47 views

Forgive my ignorance but I've not played around with PHP's garbage collection before. Specifically, I'm running a CakePHP 5.x Command Script and running into memory exhausted issues. As a test to see ...
guyverdio's user avatar

1
2 3 4 5
246