Hi all. I was hoping I could get some guidance from the folks here that have been playing with the Rotor code a bit longer than I have.
All this is with the latest Rotor drop on WinXP. As part of an experiement in adding refcounting to Rotor, the first step, of course, is adding the refcount field itself. It seems that the ObjHeader structure is the appropriate place to put these precious four bytes. So I went ahead and added my DWORD, just before the m_SyncBlockValue field. I also updated the SIZEOF_OBJHEADER macro to 8 just above the ObjHeader class definition. (BTW - is there a reason for SIZEOF_OBJHEADER to exist? What's wrong with plain old sizeof()?) I got an assertion error about MIN_OBJECT_SIZE (defined in object.h) not being the right size anymore. I looked at the definition, and it looked like there were four bytes of padding in there anyway, so I took out the "2 * " from MIN_OBJECT_SIZE, and fixed that assertion. Now, I'm hitting an assertion in binder.cpp, line 636. It looks like there's a table of field offsets, and it's comparing the actual offset to the ones in the table. I'm kinda stuck here - I'm not sure why they don't match. So, my questions are: 1) Was the change I make to the MIN_OBJECT_SIZE ok? 2) What's the deal with the offset tables in the Binder class? How do I update those tables so things line up properly again? 3) Is there a better place to put the ref count? Thanks, -Chris Tavares