Re: --managed-mem Enable managed memory. Used on Windows.
- Posted by jimcbrown (admin) Feb 12, 2014
- 1826 views
By accident, this means MINGW compiled has this disabled too.
This is not true. It is possible to build binaries today with MinGW that run on Windows 9x, as long as you enable managed memory and align4. The ONLY issue is that the binary incorrectly reports itself as using system memory, even though it has been compiled with and is actually using managed memory.
By design UNIX systems builders cannot enable this feature.
I argued that system builders should have this choice even if we are not using Windows but I couldn't convince the other developers at the time.
Agreed.
Managed memory arguably bloats the memory use of your program, but it prevents calls to free/malloc so it could be faster. Managed memory is absolutely required when malloc may not return 8-byte aligned addresses (internally EUPHORIA relies on this). In UNIX, no known platform has a malloc that doesn't return 8-byte aligned addresses,
I think it was because the overhead of align4 made no sense on UNIX, and no one had solid statistics of the speed benefits of using managed memory at the time. This was before managed memory and align4 were separated out.
so it is meant to be disabled for UNIX by disabling it for GNU make.
IIRC it's actually EUNIX in the source code that disables it, not a GNU makefile setting. (EUNIX doesn't apply when building with MinGW, so...)