Am 13.11.2018 um 19:46 schrieb Axel Davy <davyaxel0@gmail.com>:I assume on windows, OpenGL, d3d, etc all allocate in the 2GB. Thus I believe most of the difference is the space taken by the mapped library codes (llvm, libx11, etc), and eventually some libraries allocating more space than they should (pulseaudio).
If I understand correctly, windows maps some of its code onto the high 2GB, thus library code could be mapped there without bugs ?
I don't know of anything where that's the case, although I might be mistaken. Afaics the libraries themselves aren't big, it's the runtime allocations that are the problem. And as soon as we allow limited use of higher addresses, preventing them from leaking into the application will be rather difficult. E.g. in https://github.com/andrerh/hangover I allow Linux and Wine libs to load > 4GB for 32 bit processes. I ran into a problem where libpng passes a pointer to a static variable to windowscodecs, which in turn passes it to an application IStream method...