• Advertisement
Sign in to follow this  
  • entries
    2
  • comments
    5
  • views
    1135

Entries in this blog

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.

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.
Sign in to follow this  
  • Advertisement