[Mono-devel-list] Limiting Memory Allocation

Jim Purbrick jimpurbrick at yahoo.co.uk
Thu May 5 15:23:49 EDT 2005


> Even with CAS on Microsoft's .NET, the system isn't
> really geared to running the way you need to on a 
> game server. 

No, it's not, but with Mono you get a very good
virtual machine that (hopefully) just needs some panel
beating in places to work in a game server.

> In contrast with the Java JVM, the philosphy of .NET

> isn't one of a virtual machine within
> the machine. Instead .NET is meant to be a layer
> over OS functionality that just makes stuff easier 
> for developers.

Again, the JVM is a square peg too.

> The practical upshot of this is for example is if
you
> need to schedule lots of code to run concurrently
you
> have to use OS threads. That's OK for a web server
> that might have 10 or maybe 20 ASP.NET apps running
> on it, but if you gave every script on a SecondLife 
> server a seperate thread the machine
> would grind to a halt.  

Which is why the plan is to inject bytecode to perform
threading in a similar way to the .NET 2 iterators
that Thomas was talking about.

> Likewise .NET doesn't have a
> mechanism that's explicity designed for handling 
> memory allocation.

Does Java?

> You can do some stuff using the profiler API as 
> you've seen but it's clearly not intended for that 
> use.

No, but again if it's good enough, then that's OK.

> Also, if you need to inject code into a random
> .NET assembly, you can do that using the profiler
> API (with a lot of additional code of course!), but 
> it's easier and more robust to create
> a modified assembly on disk ahead of time instead.

Agreed. The solution will probably involve some
bytecode translation of assemblies, some appropriation
of runtime facilities like profiling and (hopefully
not too much) hacking of the runtime and or libraries.

> A lot of stuff in .NET 1.x seems geared to support
> the ASP.NET server which figures as they are
probably
> the most advanced 'customer' of the CLR in that 
> version. 

I think you're right, but I also think there's enough
good stuff in there that it's worth trying to bend it
a bit to use elsewhere.

> Unless you're a big Microsoft product team though 
> it's probably quite hard to get features added to
the
> .NET CLR :)

Yes, much easier to make use of the things everyday
folk leave behind :-)

Cheers,

Jim. 


		
___________________________________________________________ 
Does your mail provider give you FREE antivirus protection? 
Get Yahoo! Mail http://uk.mail.yahoo.com



More information about the Mono-devel-list mailing list