Subject: Re: DRI [was: Re: more summer of code fun]
To: der Mouse <mouse@Rodents.Montreal.QC.CA>
From: Jonathan Stone <jonathan@dsg.stanford.edu>
List: tech-kern
Date: 06/24/2005 19:34:40
In message <200506250024.UAA19129@Sparkle.Rodents.Montreal.QC.CA>der Mouse writ
es
>> Well, I know this patent, and it's about the comparison of two
>> pointers with the aim of finding out whether they actually point to
>> the same memory.  I think we're doing this pretty often.
>
>Probably.
>
>> Think e.g. NULL pointer checks after malloc calls here.

I haven't seen the patent, but Tonnere mentioned classes, so I
suspect _very_ strongly that the patent could relates to comparison of
pointers which may (or may not) be cast to different sub-member
objects.



>That's not an instance.  NULL does not point to any memory, so it
>doesn't make sense for comparison against it to be comparing two
>pointers to find out whether they point to the same memory; 

Think of the typical non-thunk implementation of C++ classes.  Suppose
you have a pointer to a class, C1, which has four other classes, C2
through C5, as "struct"-style" of itself, C1.  Suppose you have a
pointer to a C1 object.  Suppose further you cast that pointer to
point to (say) the C3, and then compare that pointer to another C3 pointer.

The ARM, 2nd. ed., has[*] some pretty pictures of the (then)
state-of-the-art in adjusting pointer offsets, doing NULL checking,
etc. Typical compiler-emitted code fragments for comparisonof class
pointers get quite long and branch-heavy very quickly.

I've been out of that field for some years, and I see a lot of
problems in the field software patents[**], but I can readily imagine
ideas here that are quite reasonably patentable.


[*] At least, that's what I recall; my copy went missing some years back.

[**] not least of which is that, in layman's terms, the US Patent
Office used to not regard CS degrees as a suitable qualification for
employment as a patent clerk; thus for some years, the Patent Office
issued software patents without having any patent clerks with a
background in CS.  Thus, atrocities like xor-cursor patents.
(finally getting marinally on-topic...)