Memory Management

Jan 21, 2012 at 9:29 AM

I've been fooling around with COSMOS and the graphics side of it, like drawing lines, circles, plotting point arrays, etc...

This got me thinking, in .NET C#, if you do not nullify a variable, the Garbage Collector will do that for you once it finds the unused variable.

My question is; Has the Garbage Collector been Plugged, or implemented in some other form, or should I be more careful about how I use my variables?

Thanks, Luke.

Coordinator
Jan 21, 2012 at 11:21 AM
We dont have a garbage collector yet. We're not working on it currently either. Right now we're working on some kernel code (FAT read/write is coming, hopefully some networking support after the next release). our next major area of work after next release however will be the compiler. once that's done enough, we think people will step up and start implementing garbage collectors..

On Sat, Jan 21, 2012 at 11:29 AM, LukeTerry <notifications@codeplex.com> wrote:

From: LukeTerry

I've been fooling around with COSMOS and the graphics side of it, like drawing lines, circles, plotting point arrays, etc...

This got me thinking, in .NET C#, if you do not nullify a variable, the Garbage Collector will do that for you once it finds the unused variable.

My question is; Has the Garbage Collector been Plugged, or implemented in some other form, or should I be more careful about how I use my variables?

Thanks, Luke.

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Jan 21, 2012 at 12:45 PM

Okay, thanks, just I am writing some memory-heavy graphics classes and don't want to find that they use all of the memory. 

Is there anyway to remove a variable from memory manually?

Coordinator
Jan 21, 2012 at 2:13 PM
> Okay, thanks, just I am writing some memory-heavy graphics classes and
> don't want to find that they use all of the memory.
>
> Is there anyway to remove a variable from memory manually?

No because we dont have a tracking memory manager even yet. Many of our
resource are still working on a blocking compiler bug...
Developer
Jan 21, 2012 at 4:07 PM

Also, unless your doing it to learn how to write the graphics code (or have some other reason for doing it yourself :P), you might actually want to look at Orvid.Graphics in the repo (source2->Users->Orvid->Orvid.Graphics), as it already has a lot of what you've mentioned implemented.

Jan 21, 2012 at 11:23 PM

I am writing some of the graphics code for PearOS, and I am not a fan of external dependencies; I've already written some basic code for drawing lines, circles, etc... I find the challenge invigorating, and the way that PearOS interacts with the VGAScreen class would mean going through the Orvid.Graphics source and changing it to work with PearOS.

I know I am taking the hard road for this, but it means I will know how to do it in the future, if the need ever arises. 

Thank you though for your answers, 

Luke

Coordinator
Jan 21, 2012 at 11:28 PM
> I am writing some of the graphics code for PearOS, and I am not a fan of
> external dependencies; I've already written some basic code for drawing
> lines, circles, etc... I find the challenge invigorating, and the way
> that PearOS interacts with the VGAScreen class would mean going through
> the Orvid.Graphics source and changing it to work with PearOS.

FWIW Orvid's code will eventually be merged into Cosmos when we are ready.