Currently developing a Memory Manager , Need help fast.

Topics: Developing Cosmos (Working on Cosmos source code directly), Other, Using Cosmos (Developing your own OS, projects, etc)
Developer
Aug 22, 2013 at 7:30 PM
Edited Aug 22, 2013 at 7:31 PM
Hey guys i'm writing a memory manager. I need to know if variable types like uint,int, string, etc use the heap directly.

and also i have another problem

My Memory Managers at Start up gets a count of all objects that requested allocated memory.

It detects 1389 memory objects at startup.

then i create a variable arr like so
 public uint[] Arr = new uint[8];
Then it detects 1390 memory objects.

Memory Manager recognised a increase in memory object count but the size of Any array is always 38.

Is it supposed to be 38 or is it just a initialized size. I'm getting the size info from Malloc in heap class.
Coordinator
Aug 23, 2013 at 7:29 AM
We use the heap only for objects and boxes (which are fake-objects). Just like .NET does.

The extra data you talk about with sounds wrong: If I recall correctly, the overhead of an array is 16 bytes.


2013/8/22 forest201 <[email removed]>

From: forest201

Hey guys i'm writing a memory a memory manager. I need to know if variable types like uint,int, string, etc use the heap directly.

and also i have another problem

My Memory Managers at Start up gets a count of all objects that requested allocated memory.

It detects 1389 memory objects at startup.

then i create a variable arr like so
 public uint[] Arr = new uint[8];
Then it detects 1390 memory objects.

Memory Manager recognised a increase in memory object count but the size of Any array is always 38.

Is it supposed to be 38 or is it just a initialized size. I'm getting the size info from Malloc.

Read the full discussion online.

To add a post to this discussion, reply to this email ([email removed])

To start a new discussion for this project, email [email removed]

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


Developer
Aug 23, 2013 at 2:16 PM
I want cosmos to request managed memory from the memory manager when it creates new objects like uint,int, byte, string, char etc.

So which class does it use to allocate memory for data types?
Coordinator
Aug 23, 2013 at 2:45 PM
there's a Heap class in one of the system plug libraries.
Also, primitives except string value types..



2013/8/23 forest201 <[email removed]>

From: forest201

I want cosmos to request managed memory from the memory manager when it creates new objects like uint,int, byte, string, char etc.

So which class does it use to allocate memory for data types?

Read the full discussion online.

To add a post to this discussion, reply to this email ([email removed])

To start a new discussion for this project, email [email removed]

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


Developer
Aug 23, 2013 at 3:44 PM
Can't find it