When dealing with memory, unfortunately for Roblox that’s all in the C side code which handles memory for stuff like garbage collection I believe.
Same goes with where the memory is located and how Roblox internally implements the require function.
Without access to the C code one can only take wild guesses as to where the memory is stored specifically.
Might want to ask Roblox staff instead.
Otherwise I believe the garbage collection rules should apply, it’ll be in memory until there is no longer a reference to it.
local module = require(stuff)
wait(99999)
print(module)
module.doStuff()-- still in reference
--and thread is still alive