As I've said before on this list, I'm porting an Object Pascal application to MacOS using a GPC cross-compiler. I've got a sort of minimal runtime system on the Mac, which enables my application to run - however, it explodes on (as far as I can see) the first call to a virtual function. This may be because my implementation of GPC_New/_p_new just looks like this:
void * _p_new(int size) { return malloc(size); }
Whereas the proper one appears to do thinks like mark the object. My question is, is it the case that I need to fix up the vtbl in _p_new, and if so where do I do it? Where does marking fit into it?