Specifying data segment for instances of a class
-
Hello folks! I am using this[^] method to control the initialization order of some global objects. I have (plans for) a class that will be instantiated all around the code, all instances will be globals, i was wondering, is there maybe a way to specify that i want all instances of this class instantiated in a given segment so i don't have to use
#pragma init_seg("aseg$x", some_method);
CIWantThisInSegX whatevera;
CIWantThisInSegX whateverb;everywhere and instead i can just create the instances and they will be placed in the correct segment "automatically"? Maybe by specifying a new operator for it? If it was possible it would help a lot because it is enough to forget the init_seg part only once and havoc might get loose. Thanks in advance for any ideas.
> The problem with computers is that they do what you tell them to do and not what you want them to do. < > "It doesn't work, fix it" does not qualify as a bug report. < > Amazing what new features none of the programmers working on the project ever heard of you can learn about when reading what the marketing guys wrote about it. <