1. --managed-mem Enable managed memory. Used on Windows.

Hallo

this option seems to be ignored on windows.
At least the binary still displays 'Using System Memory'

Andreas

new topic     » topic index » view message » categorize

2. Re: --managed-mem Enable managed memory. Used on Windows.

andi49 said...

Hallo

this option seems to be ignored on windows.
At least the binary still displays 'Using System Memory'

Andreas

That sounds like a bug. Looking at the source code, however, I think the bug is limited to an inaccurate display - it says system memory but is really using managed memory. The issue is that Makefile.gnu isn't passing the appropriate -D EU_MANAGED_MEM flag, unlike Makefile.wat

new topic     » goto parent     » topic index » view message » categorize

3. Re: --managed-mem Enable managed memory. Used on Windows.

jimcbrown said...
andi49 said...

Hallo

this option seems to be ignored on windows.
At least the binary still displays 'Using System Memory'

Andreas

That sounds like a bug. Looking at the source code, however, I think the bug is limited to an inaccurate display - it says system memory but is really using managed memory. The issue is that Makefile.gnu isn't passing the appropriate -D EU_MANAGED_MEM flag, unlike Makefile.wat

Hallo
Do i have to file a ticket for this?

Andreas

new topic     » goto parent     » topic index » view message » categorize

4. Re: --managed-mem Enable managed memory. Used on Windows.

andi49 said...
jimcbrown said...
andi49 said...

Hallo

this option seems to be ignored on windows.
At least the binary still displays 'Using System Memory'

Andreas

That sounds like a bug. Looking at the source code, however, I think the bug is limited to an inaccurate display - it says system memory but is really using managed memory. The issue is that Makefile.gnu isn't passing the appropriate -D EU_MANAGED_MEM flag, unlike Makefile.wat

Hallo
Do i have to file a ticket for this?

Andreas

Probably.

new topic     » goto parent     » topic index » view message » categorize

5. Re: --managed-mem Enable managed memory. Used on Windows.

By design UNIX systems builders cannot enable this feature. By accident, this means MINGW compiled has this disabled too. 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.

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, so it is meant to be disabled for UNIX by disabling it for GNU make.

Shawn Pringle

new topic     » goto parent     » topic index » view message » categorize

6. Re: --managed-mem Enable managed memory. Used on Windows.

SDPringle said...

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.

SDPringle said...

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.

SDPringle said...

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.

SDPringle said...

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...)

new topic     » goto parent     » topic index » view message » categorize

7. Re: --managed-mem Enable managed memory. Used on Windows.

jimcbrown said...

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.

Generally speaking less code is faster but to decide this a priori is false economy. With managed memory you cache the memory in the same process. With simple malloc, the OS gets involved for each call to EMalloc and EFree. Memory wise simple malloc is more efficient. Process cycle-wise remains to be seen. Tests that prove on way over another on one machine might have opposite results on another.

Shawn Pringle

new topic     » goto parent     » topic index » view message » categorize

8. Re: --managed-mem Enable managed memory. Used on Windows.

jimcbrown said...
andi49 said...

Hallo

this option seems to be ignored on windows.
At least the binary still displays 'Using System Memory'

Andreas

That sounds like a bug. Looking at the source code, however, I think the bug is limited to an inaccurate display - it says system memory but is really using managed memory. The issue is that Makefile.gnu isn't passing the appropriate -D EU_MANAGED_MEM flag, unlike Makefile.wat

I also believe that eu* is being compiled managed mem on windows, just not properly displayed. should not be that difficult to fix.

It could be improper flags passed in the Makefile as well. I had looked into this and have mentioned it a few times in posts or bug reports as an aside, I didn't want to mess around in that area personally. I suspect this is at least partially why the bug persists if anyone else even noticed it.

I have used both Managed mem and System mem and they appear to handle memory use slightly differently. there should be some kind of quick test in the initiate manually directory to verify the build does what it claims to with memory on windows.

new topic     » goto parent     » topic index » view message » categorize

9. Re: --managed-mem Enable managed memory. Used on Windows.

Managed mem vs. system mem effects are not noticeable in most programs. If you can fool EUPHORIA into calling a customized version of free that keeps a counter that you can later display, then you can write a program that does this. Such code is OS dependent.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu