In VM§

See primary documentation in context for method request-garbage-collection

Available as of the 2020.05 release of the Rakudo compiler.

Class method that tells the virtual machine on which Raku is running, to perform a garbage collect run when possible. Issues a warning if such a request is not supported by the virtual machine.

Provides no guarantee that the process will actually use less memory after a garbage collect. In fact, calling this method repeatedly, may actually cause more memory to be used due to memory fragmentation.

Mainly intended as a debugging aid for module / core developers.