We are running an python application which needs ~2400MB (on Windows). Our Raspberry Pi 3 has a 4GB swap and runs on 164MB RAM idle. So from our point of view python should be able to use 4GB on the 32Bit system. However when RAM + Swap reaches around 2GB python runs into an MemoryError. Is there a way to show the memory limit of the used python version and is it possible to increase the limit temporary?
Your kernel could be build with 2G/2G memory split (giving 2GB of virtual address space to the kernel and leaving another 2GB for the applications). You can check that in kernel config:
zcat /proc/config.gz | grep CONFIG_VMSPLIT
If this is the case, no application will be allowed to allocate more than 2GB, no matter how much RAM and swap you have. You'll have to compile a kernel with
CONFIG_VMSPLIT_2G=n (or find a kernel someone else compiled with that flag switched off) to use more than 2GB.
LARGEADDRESSAWARE is specific to PE executable format and doesn't exist in Linux where ELF executables are used.