memory

Pros and Cons of the various Memory Allocation Strategies

In C++ you have the choice between various memory allocation strategies. In addition to the frequently used dynamic memory allocation you have the stack allocation. But you can preallocate the memory at the start time of your program. This can be a fixed sized block or one or more memory pools. Each of these strategies have its pros and cons. Which one, I will answer in this post.

 

Read more
Tags: memory
Comments 5Views: 4078

Strategies for the Allocation of Memory

There a lot of different strategies for allocating memory. Programming languages like Python or Java request their memory from the heap at runtime. Of course, C or C++ has also a heap but prefers the stack. But this are by far not so only strategies for allocating memory. You can preallocate memory at the start time of the program as a fixes block or as a pool of memory blocks. This preallocated memory can afterwards used at the runtime of your program. But the key question is. What are the pros and cons of the various strategies to allocate memory?

Read more
Tags: memory
Add CommentViews: 2134

Improvements of this Blog

In my post Time for Wishes I asked: "How can I improved my blog?" And here are the answers.

Read more
Tags: memory
Add CommentViews: 730

Overloading Operator new and delete 2

I overloaded in the last post operator new and delete. Therefore, it was possible to find memory leaks and get a first hint of the bad guys. My solution had two not so nice properties. With this post, I will overcome them.

Read more
Tags: memory
Add CommentViews: 2507

Overloading Operator new and delete 1

It happens quite to often that a C++ application allocates memory but don't deallocate it. This is the job for operator new and delete. Thanks to them both you can explicitly manage the memory management of an application.

Read more
Tags: memory
Add CommentViews: 2085

Explicit Memory Management

Explicit memory management has in C++ a high complexity but also provides a great functionality. Sad to say, but this special domain in not so known in C++. For example, you can directly create objects in static memory, in a reserved area, or even in a memory pool. That is functionality, that is often key in safety critical applications in the embedded world. Before the harvest is the work. Therefore, I will give in this post an overview, before I dive deeper into the details.

Read more
Tags: memory
Comments 7Views: 2483

Garbage Collection - No Thanks

C++ is old fashioned. C++ has no garbage collection. No garbage collection? Right! Old fashioned? Wrong!

Read more
Tags: memory
Comments 1Views: 7110

My Newest E-Book

Latest comments

Subscribe to the newsletter (+ pdf bundle)

Blog archive

Source Code

Visitors

Today 137

All 279145

Currently are 177 guests and no members online