Updates to FFI spec: performGC

Manuel M T Chakravarty chak at cse.unsw.edu.au
Wed Sep 11 02:31:18 EDT 2002

Alastair Reid <alastair at reid-consulting-uk.ltd.uk> wrote,

> I think the thing to do is add the existing performGC to the standard
> (perhaps giving it an hs_ prefix in the process) and leave development
> of an extended version of the function for when the GHC folk (or
> anyone else with a generational collector) decide they want a
> forcefulness argument.  Come that day, we'd define:
>   void performGC(void) { performPartialGC(0); }
> (or whatever it is you do to force a full collection).

Ok.  So, how about

  void hs_perform_gc (void);

with the following specification:

  The function hs_perform_gc() advices the Haskell storage
  manager to perform a garbage collection.  This function
  must not be invoked from C functions that are imported
  "unsafe" into Haskell code.

Do you want a stronger wording on what kind of garbage
collection is to be performed or do we want to keep it
deliberately unspecified (ie, leave it to the individual
Haskell system)?


More information about the FFI mailing list