Skip to main content

Questions 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.

9 votes
2 answers
858 views

This is my first time doing any kind of serious coding in C. I watched a Youtube video on what an Arena Allocator should do and I tried my best to make an implementation for it. As of now, we have the ...
Aron Cauê's user avatar
2 votes
1 answer
92 views

I was recently working on my CUDA wrappers library, and this particular class is one of the oldest pieces of code in the entire project. Since that time, I added tons of other features (for example <...
NeKon's user avatar
  • 641
12 votes
1 answer
799 views

When I discovered that CUDA device memory was represented by plain old void* I was horrified by having to deal with C-style type safety and resource ownership (i.e. ...
Toby Speight's user avatar
  • 88.7k
14 votes
5 answers
2k views

I wrote Cooley-Tukey's FFT algorithm in C. And I want to know how safe is this code? Is it just trash? How can I make it more memory safe? ...
RudraSama's user avatar
  • 181
10 votes
6 answers
2k views

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 ...
Super Tux's user avatar
  • 313
1 vote
0 answers
107 views

(See the previous and initial iteration.) This time I have incorporated some improvement points made by G. Sliepen: driver.cpp: ...
coderodde's user avatar
  • 32.3k
8 votes
1 answer
550 views

(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 ...
coderodde's user avatar
  • 32.3k
4 votes
2 answers
274 views

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, ...
Mr. Clear's user avatar
  • 143
0 votes
1 answer
109 views

I was trying to come up with some design to subclass built-in exceptions. For simplest case I used something like this: ...
Jakub's user avatar
  • 11
4 votes
2 answers
332 views

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 ...
wwite's user avatar
  • 83
4 votes
2 answers
495 views

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 ...
HernanATN's user avatar
  • 369
9 votes
1 answer
701 views

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 ...
HernanATN's user avatar
  • 369
14 votes
2 answers
597 views

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 ...
Quasar's user avatar
  • 639
2 votes
1 answer
85 views

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: ...
Jayson Meribe's user avatar
2 votes
0 answers
164 views

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, ...
InfiniPLEX's user avatar

15 30 50 per page
1
2 3 4 5
44