CARVIEW |
Select Language
HTTP/2 200
date: Sat, 26 Jul 2025 09:51:18 GMT
content-type: text/html; charset=utf-8
cf-ray: 9652ff6b3efdcf00-BLR
cf-cache-status: DYNAMIC
cache-control: private
set-cookie: prov=d39a71c3-fbc5-4518-9a34-a4cbb6924782; expires=Sun, 26 Jul 2026 09:51:18 GMT; domain=.stackexchange.com; path=/; secure; httponly
strict-transport-security: max-age=31536000; includeSubDomains
vary: Accept-Encoding
content-security-policy: upgrade-insecure-requests; frame-ancestors 'self' https://stackexchange.com
x-clacks-overhead: GNU Terry Pratchett
x-frame-options: SAMEORIGIN
x-request-guid: d2a52d70-595e-4d51-9654-bcd41bddcd7b
x-worker-origin-response-time: 592000000
x-dns-prefetch-control: off
set-cookie: prov=d39a71c3-fbc5-4518-9a34-a4cbb6924782; Path=/; HttpOnly; Domain=stackexchange.com
set-cookie: __cf_bm=sS98jm_HZiTTEeFWqlg0GyeYGKvb13406w2UtyB7Yxc-1753523478-1.0.1.1-VCGpnkzFPQMTjpAB_uGa_IaU5e14hCNckdf_owp4DUF97U_bP6i3ZOsssJdXca9HDRXbQX0aLjxJ9h0nUqsNWl9.izammbVAalqzF0yG778; path=/; expires=Sat, 26-Jul-25 10:21:18 GMT; domain=.stackexchange.com; HttpOnly; Secure; SameSite=None
set-cookie: _cfuvid=HoV711XjynVc46HSOTwcPJ1dbm0IuGmJSii5GLR_cl8-1753523478880-0.0.1.1-604800000; path=/; domain=.stackexchange.com; HttpOnly; Secure; SameSite=None
server: cloudflare
content-encoding: gzip
Newest 'memory-management' Questions - Code Review Stack Exchange
Skip to main content
Stack Exchange Network
Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack ExchangeTeams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about TeamsQuestions tagged [memory-management]
Memory management is the act of managing computer memory by allocating portions of memory to programs as well as freeing memory so that it can be re-used.
648 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
10
votes
6
answers
2k
views
k-Nearest Neighbors algorithm in C
I've been learning C for a while, and I decided to make a simple kNN program. What can I do to improve the program?
Am I doing memory management right? Can the structure of the code be improved in ...
1
vote
0
answers
74
views
MemoryGraveyardDriver.sys - a kernel mode device driver managing a kilobyte of RAM for random reading/writing: Take II
(See the previous and initial iteration.)
This time I have incorporated some improvement points made by G. Sliepen:
driver.cpp:
...
8
votes
1
answer
512
views
MemoryGraveyardDriver.sys - a kernel mode device driver managing a kilobyte of RAM for random reading/writing
(See the second and next iteration.)
Intro
I have this GitHub repository. Basically, it does not do anything fancy: it has a byte buffer of 1Kb size, and it intercepts ...
4
votes
2
answers
194
views
C++ wrapper for FreeRTOS blocking queue that can handle complex objects
The FreeRTOS queue is a convenient way for intertask communication on FreeRTOS. But it is written in pain C and therefore it feels a little uncomfortable for C++ programmers. But the main problem is, ...
0
votes
1
answer
90
views
Implementing safe custom exception [closed]
I was trying to come up with some design to subclass built-in exceptions.
For simplest case I used something like this:
...
4
votes
2
answers
249
views
SPSC templatized lock free queue implementation and benchmarking
I have tried implemented a fast lock free Single producer single consumer queue in C++ for practicing concurrency and low level design concepts. I also benchmarked the code on x86_64 2.3GHz Intel ...
4
votes
2
answers
416
views
Arena/Region Allocator in C++ (rev 2)
2nd revision of original post: Arena/Region Allocator in C++
Context, changes
Trying to get a better grasp on low-level memory management, I implemented an arena allocator in C++. It's a rough ...
9
votes
1
answer
648
views
Arena/Region allocator in C++
Update: 2nd revision on separate post: Arena/Region Allocator in C++ (rev 2)
Original Post
Trying to get a better grasp on low-level memory management, I implemented an arena allocator in C++.
It's a ...
14
votes
2
answers
537
views
Custom implementation of `std::unique_ptr<T>`
I skimmed through the documentation on cppreference.com and put down the basic functionalities expected out of a unique_ptr<T> implementation. I coded up a ...
2
votes
1
answer
75
views
I have a pytorch module that takes in some parameters and predicts the difference between one of it inputs and the target
One instance of the following module uses up to almost 75% of my vram. So, I was wondering how I could improve that without slowing down runtime too much. The code is below:
...
2
votes
0
answers
135
views
Allocate managed objects in C# on the native heap
This is a pretty basic class to allocate objects from the native heap. The whole process goes as follows: allocate bytes from NativeMemory.Alloc, set the method table pointer from an existing object, ...
2
votes
1
answer
141
views
Javascript Signals implementation
I've created my own implementation of signals in typescript, inspired by the proposed tc39 specification (https://github.com/tc39/proposal-signals) in the BOM. I think it would be great if I could use ...
4
votes
3
answers
682
views
Error handling for singly linked list in C
I have seen many list implementations in C in this site; I know its been asked many times. I need some advice regarding:
Quality of my code, especially my list library.
How to handle errors in main (...
3
votes
1
answer
246
views
Presence of UB and memory usage of a std::array initialization
I proposed several techniques to answer to https://stackoverflow.com/q/78672409/21691539.
A classical way to answer would be to use std::index_sequence-based ...
5
votes
1
answer
225
views
Unit Tests for an Arena Allocator
In my last post about the allocator, I received some comments about unit-tests:
The code looks correct on the majority of the cases, I will suggest run valgrind or define a good set of unit tests ...
- The Overflow Blog
-
-
- Featured on Meta
-
-
Related Tags
c++ × 264
c × 191
performance × 87
c++11 × 57
pointers × 57
c# × 55
linked-list × 42
beginner × 39
array × 36
strings × 34
memory-optimization × 32
java × 30
python × 29
object-oriented × 20
c++17 × 17
vectors × 17
javascript × 16
c++14 × 15
error-handling × 15
algorithm × 14
objective-c × 13
template × 13
.net × 12
csv × 12
more related tags
Hot Network Questions
- Is it decidable whether a CFL can be recognized by a linear CFG?
- Where should a drain saddle for an RO system be installed?
- What does "enter the hold at arden" mean
- Why does my laptop's display turn off when I'm away from the keyboard?
- Is it okay to email researchers if I’m just a high school student?
- Why does “brew search” for “peertube” match with “freetube”? How does the search work?
- Is the surface of Mars or the Moon mostly (or relatively) homogeneous, unlike the Earth?
- Balancing a Holy Water Bomb
- Decoding chainstate UTXOs: TXID, block height, and balance misalignment
- Mars colony book I read in the 80's. The name?
- Current integrator LTSpice simulation
- Story that taught cryptography in the form of a manga
- Can you yaw an airplane by only using differential thrust?
- Write two very different programs with the same characters
- Sram crank upgrade
- Tracking stored procedure performance metrics
- When did the OEIS get even better?
- How much of a really big a spaceship could a nuke take out?
- Blinded despite Blindsight?
- Why is 0.0 printed as 0.00001 when rounding upward?
- Symbols for A.P. Morse's book in Set Theory
- How should one pronounce plural French-derived German words?
- Humans on alien planet get tailed by silent humanoids
- How do Francophones hear "ChatGPT"?