Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

If iOS is a 32 bit OS, how can we be using uint64_t and int64_t?

Tags:

ios

It seems to work correctly, but I thought that the most that could be stored in memory was a 32 bit integer?

Now I'm confused as to what difference it makes.

Thanks!

like image 661
Thomas Clayson Avatar asked Dec 05 '22 12:12

Thomas Clayson


1 Answers

I think the other answers didn't quite explain this correctly.

uint64_t and int64_t are C-language data types, not hardware data types. The compiler does whatever it takes to make these types work as 64-bit unsigned or signed integers. If the hardware provides 64-bit registers and integer operations then well and good -- the compiler will use those directly. If the hardware has only 32-bit registers (or 16-bit or 8-bit), the compiler and runtime system use software emulation to get the job done.

like image 72
Charlie Price Avatar answered Jan 05 '23 01:01

Charlie Price