We want to run global.gc() from within a Firebase Function. Locally, we start the node process with node --expose-gc .... How do we do the equivalent of that with a deployed Firebase Function?
As far as I can tell, there is no way to inject node --expose-gc when a Firebase Function starts. Further, there appears no way to set NODE_OPTIONS="--expose-gc before the Firebase Function starts node.
We have tried setting process.env.NODE_OPTIONS='--expose-gc' from within the Firebase Function. That, however, does not work. We assume the reason that does not work is that --expose-gc must be set when node starts (and not after node is already running).