dotgnu-pnet
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Pnet-developers] Use of ILNativeUInt vs. unsigned long in pointer c


From: Rhys Weatherley
Subject: Re: [Pnet-developers] Use of ILNativeUInt vs. unsigned long in pointer casting and manipulation
Date: Tue, 28 Sep 2004 06:31:35 +1000
User-agent: KMail/1.4.3

On Monday 27 September 2004 06:08 pm, Miroslaw Dobrzanski-Neumann wrote:

> This way you do not have to shift any bits neither make assumptions about
> how a pointer is beeing represented.
> I believe that pointer dereferencing and comparison costs not more then bit
> shifting and masking.

As I said, "I look forward to your patch".  An example of how it might be done 
is not a patch.

One of the most common operations is "ILType_FromClass", which converts a 
class structure into an "ILType*".  Looking at your example, it would 
probably require memory allocation, vastly increasing the memory 
requirements.  And since there is no garbage collection of ILType's until 
image destruction (because there is no easy way to determine when they are 
shared due to dynamic linking), this would have a catastophic impact on 
memory usage.

And before you say "you should be cleaning them up", well my answer to that is 
"I look forward to your patch".  i.e. it is easy to suggest a change of this 
magnitude.  It is a completely different thing to actually implement it.

> Please look at glib if you want a foundation for an OO typesystem in C

I assure you that I am well aware of how to do something like this.  I don't 
need a tutorial.  If it had been the best solution to this problem, I would 
have used it from day one.

I just don't think it is worth doing in this case to support platforms so 
bletcherous that retiring them is cheaper than supporting them.

Cheers,

Rhys.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]