
Perror("Error opening file for reading") and my address sizes : 38 bits physical, 48 bits virtual But it causes Bus Error when I get the value of the pointer in GBSIZE offset: unsigned char* pCur = pBegin + GBSIZE īTW, printf("%c",*pBegin ) works fine. I want to open more than 20GB files by file mapping, is it available? Could you tell me what's MAX file size supported by file mapping in 64 bits linux machine. And the easiest answer (as usual for Python) is EAFP: try it, and prepare to handle the exception where it fails (whether programmatically, or by just reading the stack trace and searching StackOverflow for a solution).I'm new to 64-bits architecture. In that case, it will probably work on your system, but there's really no way to say for sure without knowing a lot more than you've told us. You'll then be relying on the OS's page swapping, which will of course be less efficient than windowing smaller maps of the file, but may be efficient enough, and may be a lot simpler. Occasionally, you want to mmap a file that won't actually fit into your RAM. So, however much RAM you have, you should be able to use most of it for mmap. Plenty of people are running 32-bit Windows (or 32-bit Python on 64-bit Windows) on machines with more than 4GB of RAM, but it's nearly impossible to load up a 64-bit system with a 40-bit-limited OS with more than 1TB of RAM.

This is the only one that might affect your file.īut, unlike the case with the later days of 32 bits, pretty much nobody in 2018 has more physical RAM than their OS can page all at once. IIRC, the earliest 64-bit linux kernels only used 40 bits (because there was no hardware that could use more at the time), which is only 1TB.įinally, on Windows, if you're using a "basic" or "starter" edition, it may limit things even further to as low as 8GB for Windows 8 Home Basic Edition. However, your hardware may limit things to somewhere between 44 and 56 bits (most current systems are 48-bit), and 44 bits is only 256TB.Īnd your OS may limit things even farther. Here, whether the OS reserves 512MB or 2GB isn t going to make a significant dent.

Similarly, 64-bit platforms can in theory support up to 2**64, or 16EB. On Windows, this chunk is a whole 2GB by default (you can configure it to be lower, but some software may break because it assumes it's safe to use "signed pointers"), while on other platforms it's usually more like 512MB.

But the OS reserves a chunk of that for itself. You usually don't need to worry about the limit for 64-bit mmap, but I'll explain why.įirst, 32-bit platforms can in theory support up to 2**32, or 4GB.
