Is there a Mathematica function that returns a list of all user-defined global variables?
Names["Global`*"]
That gives you the list of all definitions within Global context.
Here is a small modification to F. Rodriquez's answer.
This will indicate the memory utilized by the global variables.
checkMemory[]:=Grid[Sort[({ByteCount[ToExpression[#1]],HoldForm[#1]}&)/@Names[Global`*],First[#1]>First[#2]&]]
Thanks, Francisco.
Gregory
Thanks, Craig. Much obliged.