Jump to content
Site Stability Read more... ×
  • Advertisement
Sign in to follow this  
  • entries
    2
  • comments
    6
  • views
    1363

Entries in this blog

 

Memory Management Thoughts - ( C++ )

Hello again. Well, I was playing around with different ideas for memory management. First, I'll list the two main methods I found.


Overloading the New and Delete operators to allow for debugging information.
Creating a self-managing memory manager class that outputs debugging information


Now, I'll go ahead and discuss each of the methods and the pros/cons I found for each of them.

Overloading the New and Delete operators to allow for debugging information

Pros:

Can provide you with extremely useful debugging information on allocations with New/Delete.
Manages itself.


Cons:

Alot of overhead, you'd be storing debugging info on EVERY allocation, and removing it every DEALLOCATION.
Makes it harder to create a garbage collector.
Cannot use reference counting ( Kind of goes hand in hand with the above point.


Creating a self-managing memory manager class that outputs debugging information.

Pros:

Can provide you with extremely useful debugging information, as well as manage itself.
Makes it easier to create a garbage collector.
Can use reference counting.
Not alot of overhead, since the overloads of New/Delete operators aren't global.


Cons:

Cannot be applied to existing code without a lot of extra work.


I'll post code for each of these later.

Lenox

Lenox

 

Introduction

Hello, my name is Kyle Evans. I'm currently working on an RPG called "Audeuroa Adakitsa" ( or AA for short ). I'm going to take this project small steps at a time. Well, I better go to sleep, good night.

Lenox

Lenox

Sign in to follow this  
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!