|Heap pointers firstname.lastname@example.org (shrey) (2005-10-29)|
|Re: Heap pointers email@example.com (Gene) (2005-11-01)|
|Re: Heap pointers firstname.lastname@example.org (2005-11-01)|
|Re: Heap pointers DrDiettrich@compuserve.de (Hans-Peter Diettrich) (2005-11-01)|
|Re: Heap pointers email@example.com (Dmitry A. Kazakov) (2005-11-01)|
|Re: Heap pointers bobduff@shell01.TheWorld.com (Robert A Duff) (2005-11-01)|
|From:||Hans-Peter Diettrich <DrDiettrich@compuserve.de>|
|Date:||1 Nov 2005 00:24:44 -0500|
|Keywords:||GC, storage, comment|
|Posted-Date:||01 Nov 2005 00:24:44 EST|
> I am looking for simple ways to detect if for a pointer
> dereference, the particular pointer is heap pointer or otherwise. I
> know doing this at compile time is the whole world of alias
> analaysis which is still a big research topic. What I am instead
> looking for is simple, low cost, heuristics which can either at
> compile time or at run time tell me conservatively if a pointer is a
> non heap pointer. Any pointers or idead would be great.
Just a question:
Pointers frequently are passed to subroutines, do you think that it's
"cheap" to determine all possible callers of such a subroutine, and
the classes of all possible targets of those pointers?
I fear that you'll end up in real programs with very few pointers of
class "heap" or "non-heap", and with a real mass of class "either" :-(
IMO it would be more practical to add a "heap" pointer attribute to
the language, so that the parser/compiler can detect incompatible
assignments to such pointers.
[I suspect it's more practical to do it at runtime like GCs all do.
PL/I sort of had heap-only pointers with CONTROLLED storage but I
don't get the impression that it was very popular. -John]
Return to the
Search the comp.compilers archives again.