Opened 8 months ago

Last modified 2 months ago

#1650 assigned task

Empty program will sometimes do a major GC, sometimes not - figure out why

Reported by: sjamaan Owned by: sjamaan
Priority: major Milestone: 5.3
Component: core libraries Version: 5.1.0
Keywords: Cc:
Estimated difficulty: medium

Description (last modified by sjamaan)

This is an interesting thing to figure out

If you compile a completely empty file, and run it with -:g, sometimes it will do a major GC and sometimes it won't (just run it a few times, you'll notice the output is different sometimes).

Also, the major GC count is always at least 1.

This might also contribute to the instability of our benchmark results.

Change History (5)

comment:1 Changed 8 months ago by sjamaan

Owner: set to sjamaan
Status: newassigned

comment:2 Changed 8 months ago by sjamaan

Description: modified (diff)

comment:3 Changed 8 months ago by sjamaan

After some playing around with -explicit-use, it seems that the modules unit is responsible for this (or perhaps its dependency chain).

comment:4 Changed 8 months ago by sjamaan

Sometimes this doesn't happen at all. Very frustrating!

comment:5 Changed 2 months ago by felix winkelmann

I can not reproduce this on my OpenBSD machine - it would be interesting to actually see the output of -:g here and on what environment it runs.

Note that a major GC is performed after the program has executed, shortly before termination to run any pending finalizers.

Note: See TracTickets for help on using tickets.