Should not be too hard to put in? Gcc does know when a variable won’t be used anymore. So you coul compile with something like -fgarbage so it inserts an extra assembly instruction that zeros out those registers containing pointers to these dead variables. Hamad > On May 14, 2019, at 10:05, Alexander Monakov <amonakov@xxxxxxxxx> wrote: > > >> On Mon, 13 May 2019, Hamad Ahmed wrote: >> >> Yes that defeats the purpose of using a garbage collector. >> What I am trying to ask is that is there a way to ask gcc to >> empty registers that contain variables that won't be used >> anymore in the program? > > No, there's no such capability in GCC currently. > > Alexander