Re: Heap pointers

Hans-Peter Diettrich <DrDiettrich@compuserve.de>
1 Nov 2005 00:24:44 -0500

          From comp.compilers

Related articles
Heap pointers shreyas76@gmail.com (shrey) (2005-10-29)
Re: Heap pointers gene.ressler@gmail.com (Gene) (2005-11-01)
Re: Heap pointers peter.ludemann@gmail.com (2005-11-01)
Re: Heap pointers DrDiettrich@compuserve.de (Hans-Peter Diettrich) (2005-11-01)
Re: Heap pointers mailbox@dmitry-kazakov.de (Dmitry A. Kazakov) (2005-11-01)
Re: Heap pointers bobduff@shell01.TheWorld.com (Robert A Duff) (2005-11-01)
| List of all articles for this month |

From: Hans-Peter Diettrich <DrDiettrich@compuserve.de>
Newsgroups: comp.compilers
Date: 1 Nov 2005 00:24:44 -0500
Organization: Compilers Central
References: 05-10-204
Keywords: GC, storage, comment
Posted-Date: 01 Nov 2005 00:24:44 EST

shrey wrote:


> 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.


DoDi
[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]


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.