I'm not exactly a beginner when it comes to C. I've spent more than two years working with it. But I am unsure as to what int actually refers to. I've always assumed it's an integer the same size as a pointer, but I looked in stdint.h for one reason or another and I noticed that there are no #ifdefs checking for 16/32/64-bit, just straight out:
I think int is supposed to map onto a standard CPU register. So however big the general purpose integer CPU registers are is likely to be your int size. However that is not enforced in the standard. So it really is up to the compiler designer.
Ah, that's great, thanks. I guess size_t would be a good (if odd) datatype to use as an offset inside an allocation as you can't allocate anything bigger (iirc) using malloc/realloc. (pointers require constant typecasting to work with in the way I am)