Re: Freeing memory for basic-blocks and edges

2006-05-30 Thread Mike Stump

On May 29, 2006, at 1:07 PM, sean yang wrote:
For example, I know to allocate a chunk of memory to hold BB  
information is done by "ggc_alloc_cleared()". But after a function  
analysis/optimization is done, the memory should be freed.


  ggc_free (ptr);

can be used, but, if you use it, you have to be absolutely certain  
that there doesn't exist a reachable pointer to that memory,  
anywhere.  You must explicitly zero out any old pointers that pointed  
to the data, if those pointers would have been reachable otherwise.


Re: Freeing memory for basic-blocks and edges

2006-05-29 Thread Steven Bosscher

On 5/29/06, sean yang <[EMAIL PROTECTED]> wrote:

I am looking for code that corresponds to freeing memory for BBs and Edges.


It's called gcc-page.c on most systems.

Gr.
Steven