From: Stephen Kellett Date: 2005-07-20T07:00:55+09:00 Subject: Re: Memory profiling? In message <2215809421.20050720002103@scriptolutions.com>, Lothar Scholz writes >SK> this time. It is impossible to write something like RMV without using >SK> C++/assembler and patching the Ruby binary at runtime to get access to >SK> the object creation and destruction methods. > >See you had to do the same as i did for my debugger. >Whats about a standard "ruby_d.exe" which adds more hooks into the >virtual engine and still works with all extensions ? I disagree. The standard Ruby already provides various hooks, the nature of which is changing slightly for V2.0. It just needs some extra hooks in the release version. The overhead of the check if (hookPtr != NULL) { // call the hook } is negligible for the case when the hook is absent (i.e. normal usage), especially when you compare the overhead of that test (how many cycles? not many) compared to the cost of doing just about anything in the Ruby runtime or in C). I had assumed you had been able to write your debugger using the standard Ruby API calls. Stephen -- Stephen Kellett Object Media Limited http://www.objmedia.demon.co.uk/software.html Computer Consultancy, Software Development Windows C++, Java, Assembler, Performance Analysis, Troubleshooting