The -g option will make the executable files considerably larger due to the added debugger information but the impact on the size of the runtime memory usage will be minimal. If you need to conserve lots of memory, you need to look elsewhere.
If it ain't broke, I can fix that.