[Mono-list] Reference runtime internal variable in managed code
Derek Woo
dkw@iseek.net
Tue, 26 Aug 2003 18:52:30 -0400
Hi,
I am experimenting with some ideas using mono. I hope this is not =
off-topic.
I want to modify the JIT of mono to insert some code to methods when =
they
are being JIT -ted. Specifically, I need to insert a check to some =
internal
variables declared in the mono runtime (e.g. an int, a single bit, etc). =
The
problem is that these are "unmanaged" stuff existing in the runtime's
address space. And I must insert the check to User's code that are
"managed".
I need a way to insert this check crossing the "managed" / "unmanaged"
boundary. I know the "Marshal" class would do that for me. But I am =
guess it
might be too slow. Are there other ways to do it? Maybe the only better =
way
is to patch up the native code after the code gen process? Any insight =
is
appreciated. Thanks.
Regards,
Derek Woo