|
|
Re: Iterate over all heap instances? [message #537815 is a reply to message #537791] |
Thu, 03 June 2010 17:45 |
Chris Ring Messages: 16 Registered: July 2009 Location: Santa Barbara, CA |
Junior Member |
|
|
Thanks. Doesn't quite meet my use case, though. By design(!) I have no idea what Modules will in my system when I compile my library.
Maybe I can, in my meta-only module's .xdt file, loop over all Modules in the system that inherit from IHeap and somehow generate a function that does what I need. (I can't find all Modules that inherit from IHeap at runtime, can I?)
Given all the <Mod>'s that inherit IHeap, I guess I can then use <Mod>_Object_first()/next() for any dynamic instances and <Mod>_Object_count()/get() for the static instances. Given all that, I could probably call this autogenerated fxn.
Any other suggestions? This isn't trivial to put together, and if there's an easier way, I'm looking for it. Thanks in advance.
|
|
|
Re: Iterate over all heap instances? [message #537871 is a reply to message #537815] |
Fri, 04 June 2010 00:05 |
Dave Russo Messages: 172 Registered: July 2009 |
Senior Member |
|
|
On 6/3/2010 10:45 AM, Chris Ring wrote:
> Thanks. Doesn't quite meet my use case, though. By design(!) I have no
> idea what Modules will in my system when I compile my library.
>
> Maybe I can, in my meta-only module's .xdt file, loop over all Modules
> in the system that inherit from IHeap and somehow generate a function
> that does what I need. (I can't find all Modules that inherit from IHeap
> at runtime, can I?)
Right (and Right)
>
> Given all the <Mod>'s that inherit IHeap, I guess I can then use
> <Mod>_Object_first()/next() for any dynamic instances and
> <Mod>_Object_count()/get() for the static instances. Given all that, I
> could probably call this autogenerated fxn.
Right.
>
> Any other suggestions? This isn't trivial to put together, and if
> there's an easier way, I'm looking for it. :roll: Thanks in advance.
Unfortunately, there is no better way today. Although it is possible to
create the data structures to scan all instances that are created by
modules that inherit a specific interface this would result in a fair
amount of data in systems that don't need (and can't afford) the overhead.
Obviously this can can a configurable option. Contributions are welcome.
|
|
|
|
Powered by
FUDForum. Page generated in 0.04170 seconds