unsigned long and size_t have different sizeof in 64 bit environment