64-bit platform
In the C part of my project I use the following macro to check, that the target supports 64-bit pointers. This works on Linux and Windows, but fails on Sailfish. Does this mean that I am not on a 64-bit platform or the check is simply not correct?
#if UINTPTR_MAX == 0xffffffffffffffff
...
#endif
Depends on which processor you have. For example, ARMv7 is 32-bit processor Please post output of: uname -a
useretail ( 2019-06-16 00:22:58 +0200 )editIIRC even though modern hardware Sailfish OS runs on, such as Xperia X/XA2 is internally 64-bit, all the sailfish OS binaries are still 32 bit and the whole system is running in 32-bit mode.
This is likely due to not having to ship two sets of ARM binaries (one for the 32-bit ARMv7 and one for the 64-bit native aarch64).
I'm not exactly sure how this works on the XA2 plus, which has 6 GB of RAM. It could be that the kernel is compiled for 64-bit mode and runs in native 64-bit mode, while individual processes run in 32-bit mode (this is possible and done regularly for modern Linux distros - If you have ever run Steam on Linux, which is 32-bit, you have done just that). That way each process can allocate only up to ~4GB of RAM for itself, but as there are usually many processes active at any one time, the 6 GB of RAM can all be adequately used.
MartinK ( 2019-06-16 03:29:17 +0200 )editOn my Xperia X I get
However, that just tells the architecture of the kernel. There is also
That means the 64 bit kernel can also run 32 bit processes. And that's what it does:
As has been commented before I have never heard either about 64 bit builds of SailfishOS.
ugeuder ( 2019-06-16 21:13:48 +0200 )edit