>On Oct 1, 2009, at 8:31 PM, Andreas Rottmann wrote: > >> Given the above, you have two options to make the reclamation happen >> automatically: Either place a call to `collect-blas-vectors' into >> `make-blas-vectors', or register `collect-blas-vectors' with the GC, >> which is a recently-added feature[0]. You can read more about >> guardians >> in the paper "Guardians in a Generation-Based Garbage Collector", by >> Dybvig et al. [1]. > >The only little problem that I see is that making many BLAS vectors >quickly could potentially run out of memory before the GC triggers. >(because a BLAS vector of N bytes will only use fixed few bytes of >Scheme data, and it will take lots of these to cause a GC) I don't >have a clean solution to this problem. Any ideas?
The original poster may try to use the compensation stacks in the Nausicaa distribution[1][2]. There is no need to install the full Nausicaa (which is in development state), it suffices to take the following libraries: (compensations) (deferred-exceptions) (parameters) in the files: /scheme/src/libraries/compensations.sls /scheme/src/libraries/deferred-exceptions.sls /scheme/src/libraries/parameters.sls /scheme/src/libraries/parameters.ikarus.sls /scheme/src/libraries/parameters.larceny.sls /scheme/src/libraries/parameters.mosh.sls /scheme/src/libraries/parameters.ypsilon.sls HTH [1] http://github.com/marcomaggi/nausicaa [2] <http://marcomaggi.github.com/docs/nausicaa.html#compensations> -- Marco Maggi
