Memory management and where to start.

I've read a few things on memory management so far, but as far as implementing it goes, I don't know where to go. I read that you can use a for loop and overload your int. But that seemed to basic and not needed. Thanks for any help.
Is there something you need to do in your code right now that you don't know how? If not, keep going until you reach that point.
Not really, I havn't started the project yet where I will use this. I'm sort of looking for ways to implement different methods of memory management so I can understand which ones are better for which scenarios.
Use this style everywhere you can:
int x;

When you need something to last beyond the scope of where it is created, use this one:
int* pointer = new(int);
When you're done with it
delete pointer;

That's the whole of memory management from the programmer's point of view.

I see. is this sufficient enough? What if i want something in ring0 (does this have anything to do w/ memory management)?
ring0 is deep inside the operating system and nothing to do with you as a programmer, unless you happen to be writing an operating system.

You don't need to worry about memory management. The most you need to do is use new and delete, and even those are too advanced for you at the moment.
Last edited on
I mean, I have the basics of c++ down. what i'm trying to program is hard to explain aside from the fact that it needs to be private and hard to detect which is why im asking about ring0, and any info on that would be great.
Ah, I see. You're trying to create a rootkit. Good luck.
Not exactly lol.
Topic archived. No new replies allowed.