The C standard allows pointers to different types to have different sizes, e.g. sizeof(char*) != sizeof(int*)
is permitted. It does, however, require that if a
Not quite what you're asking, but back in the 16-bit DOS/Windows days, you did have the distinction between a pointer and a far-pointer, the latter being 32-bits.
I might have the syntax wrong...
int *pInt = malloc(sizeof(int));
int far *fpInt = _fmalloc(sizeof(int));
printf("pInt: %d, fpInt: %d\n", sizeof(pInt), sizeof(fpInt));
Output:
pInt: 2, fpInt 4