__if_comp__ __C__ __simple_passthrough__ """ #include """ char* nullPtr = 0; char* malloc(int size) { char* memPtr = nullPtr; __if_comp__ __C__ { __simple_passthrough__ """ memPtr = malloc(size); """ } return memPtr; } void free(char* memPtr) { __if_comp__ __C__ { __simple_passthrough__ """ free(memPtr); """ } } template void free(T* memPtr) { __if_comp__ __C__ { __simple_passthrough__ """ free(memPtr); """ } } template int sizeof() { int result = 0; T testObj; __if_comp__ __C__ { __simple_passthrough__ """ result = sizeof(testObj); """ } return result; } template T* new(int count) { return malloc( sizeof() * count ); } template T* new() { return new(1); } template void delete(T* toDelete) { free(toDelete); }