mark at livecode.com
Sat May 25 15:56:43 EDT 2019
On 2019-05-24 17:21, Bob Sneidar via use-livecode wrote:
> A 32 bit OS can only address around the first 2 gigs of memory. Not
> very good for running multiple apps.
This was the case before OSes started to use virtual addressing and
paging, but no longer.
The bitness of the OS determines the maximum amount of memory any one
application can access certainly, but they don't *share* this space.
- iOS/macOS 32-bit: every application has its own 4Gb (32-bit) address
- iOS/macOS 64-bit: every application has its own 256Tb (48-bit)
- windows 32-bit (older): every application has its own 2Gb address
- windows 32-bit (newer): every application has its own 3Gb address
- linux/android - I believe these have the same as iOS/macOS
The key difference to be noticed here is between windows 32-bit and all
UNIXy 32-bit OSes completely separate user and kernel space - a context
switch between these two modes is required to invoke a system call.
Windowsy 32-bit OSes have some kernel stuff in the user space address
space (but protected). The difference between older and newer 32-bit
OSes started in XP I believe - there is a flag you can set in the boot
params for XP which means the kernel is only given 1Gb of user space. (I
believe this was always on for post-XP OSes).
In 64-bit, all OSes work similarly - the very very very very large
address space available to any one context is split into zones. Some
zones are kernel, some are user space (for applications). The kernel
ones are only accessible when running in the kernel protection mode.
Of course, the amount of memory you can actually have in total allocated
in the system is limited by physical RAM and disk space (i.e. the paging
file) - in 32-bit OSes the amount of this any one app could use was
limited; in 64-bit it is still limited, but the limit is so high that it
is much less likely to be hit.
For most apps the 32-bit vs 64-bit address space differences probably
don't make any difference - but for apps which process large amounts of
data which would be more performant if they could hold all that data in
RAM, 64-bit is a huge boon.
* Both ARM64 (AArch64) and x86-64 processors currently only use the
lower 48-bits of the 64-bit pointers. However, there is scope in both
for this to be expanded in the future to the full 64-bit capability. Of
course it might be that it ends up getting used for something else - for
example, recent ARM architectures have added an interesting feature
which makes use of the 'empty space' in 64-bit addresses - certain
critical pointers can use those extra 16-bits to hold a piece of
encrypted information which allows the processor to validate use and
access within the processor itself.
Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps
More information about the Use-livecode