I'm working in a very RAM- and progmem- constrained space. I have a small collection of related variables and functions that I'd like to group together in some meaningful way. This collection will be visible to the rest of the program.
My first impulse (and implementation, actually) is to create a class to group all this info together, then create one global instance of that class. I understand that this is the way one is supposed to do this. There is another way to do this using a namespace instead, however, which requires no instantiation.
My question boils down to this: does the namespace approach use less RAM? By that I guess I mean, does the instantiation of a class cause additional RAM usage or some other kind of overhead? Or perhaps does it use RAM in a different way at all, like perhaps instantiation causes all the variables to exist in the heap instead of some dedicated address?