Click here to Skip to main content
15,886,362 members
Everything / General Programming / Memory Management

Memory Management

memory-management

Great Reads

by Bruno van Dooren
How to use C++ templates for implementing dynamic memory objects with custom allocator
by Vadim Stadnik
Simple and useful alternative to traditional memory pool
by Coral Kashri
More about smart memory management in C++
by Bruno van Dooren
The win32 subsystem often returns pointers to objects that need to be deallocated by the caller. In this article, I show a way to do this reliably and in an exception-safe manner.

Latest Articles

by Coral Kashri
More about smart memory management in C++
by Vadim Stadnik
Simple and useful alternative to traditional memory pool
by Bruno van Dooren
How to use C++ templates for implementing dynamic memory objects with custom allocator
by Bruno van Dooren
The win32 subsystem often returns pointers to objects that need to be deallocated by the caller. In this article, I show a way to do this reliably and in an exception-safe manner.

All Articles

Sort by Score

Memory Management 

22 Jan 2023 by Bruno van Dooren
How to use C++ templates for implementing dynamic memory objects with custom allocator
6 Feb 2023 by Vadim Stadnik
Simple and useful alternative to traditional memory pool
22 Feb 2024 by OriginalGriff
A better solution is to move the test instance to a separate server: that way there is less chance of "interactions" where software being tested affects the production DB. Remember, if the production server is using that much memory, it's for a...
31 May 2021 by OriginalGriff
Another account? What a surprise ... and still you haven't learned a thing from what we've told you. Go back to the answers you got from the other five (or is it six now, I forget) accounts where you've asked the same question over and over -...
30 Jun 2021 by OriginalGriff
Just take the double quotes of the word "methods": Quote: I was told the set and get acessors respresents "methods" for setting the value of a field ... They are methods; they are called as normal. Properties are just syntactic sugar to make the...
29 May 2021 by OriginalGriff
Another account? More of the same? Go back to all the previous times you have asked the same thing and read them carefully. This time, stop "bleeping over" anything which disagrees with what you already think and try to learn something. You...
13 Apr 2021 by CanSyr
I want to write something in a special area that I created in RAM without using any disk path in a program, then i want to open it from the other program to read and change it. MemoryMappedFile.CreateNew("Test", lenght) --> This function allows...
13 Apr 2021 by Richard MacCutchan
linux shared memory - Google Search[^]
27 May 2021 by OriginalGriff
Reference types are stored on the heap: value types may be stored on the stack. When you embed a value type in a reference type, it is a part of the class information - and since a reference type is always stored on the heap, the value type is...
28 May 2021 by Richard MacCutchan
See Chapter 9 of .NET Book Zero by Charles Petzold[^]. Charles Petzold writes clearly and fluently about all things.
29 May 2021 by OriginalGriff
Go read the previous answers, and think about them. You have been told all this repeatedly and I for one am not going to waste another half hour typing it up slightly differently for you again ...
1 Jun 2021 by OriginalGriff
Answered only to remove it from the "Unanswered" list. Question has been answered a dozen times to the same poster already.
6 Dec 2021 by Piraisudan
Hi Guys, For the below code, when I am running static code analysis, I'm getting the "'alignas' attribute cannot be applied to types" warning. How should I fix this warning? Please let me know if missing anything... template
25 Mar 2022 by Member 14858655
Here I have a List, where DocumentModel holds property byte[] XpsData. After converting byte[] XpsData into XPSDocument to bind in public static XpsDocument ByteToXpsDocument(byte[] sourceXPS) { temp++; ...
12 Jul 2022 by Member 15704684
Is This Problem Called Memory Leak? My Application include 5 Different Form. I Showing One of Them by Using this Code : Form2 frm2 = new Form2(); frm2.ShowDlialog(); Form2 Includes : Buttons, TextBox, Lables, Listbox to Add Items Into the...
12 Jul 2022 by Dave Kreskowiak
Task Manager is lying to you. You're seeing the memory that's RESERVED for your application, not how much it's actually using. When you dispose objects or free up any memory used, that memory goes back into the .NET heap it's maintaining for...
17 Jan 2023 by Syed Mubashshir Hasan
There are a few things in learning operating systems (mainly with Linux as a reference) that I don't find effectively articulated in the literature that I have read. Even in the context of operating systems like Linux, where virtual memory is...
17 Jan 2023 by OriginalGriff
"yes" or "no" :laugh: It has to do with the microprocessor architecture: Memory Segmentation in 8086 Microprocessor - GeeksforGeeks[^] it was a way to extend addressing (and thus the ram available to an application) beyond the 16 bit address...
22 Apr 2023 by Coral Kashri
More about smart memory management in C++
22 Feb 2024 by Pete O'Hanlon
Griff's solution is the correct one. When you think about it, SQL Server isn't like other typical server applications that are designed to free memory up. SQL Server is designed to be performant, and to treat the server as its own playground to...
3 Nov 2022 by Bruno van Dooren
The win32 subsystem often returns pointers to objects that need to be deallocated by the caller. In this article, I show a way to do this reliably and in an exception-safe manner.
5 Mar 2022 by Greg Utas
Recovering from memory leaks
27 Jul 2021 by OriginalGriff
Because each time you use the new keyword you allocate space on the heap - it uses a bit of memory, even if the form is empty or controls and whatnot. And objects you create with new exist until they are Disposed - which doesn't happen until...
25 Mar 2022 by Gerry Schmitz
Quote: The GC does not dispose your objects, as it has no knowledge of IDisposable.Dispose() or IAsyncDisposable.DisposeAsync(). You're not "disposing" the objects that need it (like MemoryStream). ...
30 Jun 2021 by Katlyn T
Do the set and get accessor of a Property (regular or auto-implemented) and Indexer also have a Stack-Frame on the Stack when executed? Since a method (instance or static) has a Stack-Frame on the Stack when executed, I wonder if the same...
22 Feb 2024 by Menci Lucio
Hi, A customer has a server (Windows Server 2019 with 55 Gb memory) with two instances of SQLServer (SS 2019 Standard edition), one for production, one for testing. The production SQLServer instance ends up occupying almost all the available...
27 Jul 2021 by 4L4K1
I create a WPF project and put a button on MainWindow write this code in click event to open new windows SecondWindow is an empty windows without any control or code! private void Button_Click(object sender, RoutedEventArgs e) {...