[m-dev.] for review: bootstrap hlc.gc.memprof grade

Peter Ross peter.ross at miscrit.be
Thu Aug 10 01:22:56 AEST 2000


On Tue, Aug 08, 2000 at 06:14:57PM +1000, Fergus Henderson wrote:
> On 02-Aug-2000, Peter Ross <peter.ross at miscrit.be> wrote:
> > runtime/mercury_prof.c:
> > runtime/mercury_prof.h:
> >     Make decl_fptr an extern global pointer so that mercury_wrapper.c
> >     can call fclose on it.
> > 
> > runtime/mercury_wrapper.c:
> >     Call fclose on decl_fptr.
> 
> Why do you need to call fclose(decl_ptr) from mercury_wrapper.c?
> There's already code to fclose(decl_ptr) in the MR_prof_finish()
> function in runtime/mercury_prof.c.  Isn't that the right place
> to do the close?
> 
If you examine the file under WinNT before the file has been closed, bad
things happen!  So I changed to code so that fclose happened as soon as
possible, unlike MR_prof_finish() which is called at the end of
execution.

Pete
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list