|
Re: Memory leak when compiling the emumem files.
12/28/20 04:01 AM
|
|
|
> Something within Mame's code is causing cc1plus.exe to memory leak when it compiles > at the emumem files (at least on my end). It shouldn't have to use >10 GB of ram just > to compile Mame.Didn't mean to say 10GB b/c that was from compiling under -j5.
It’s not a memory leak, it just uses a lot of memory to compile emumem_aspace.cpp, emumem_mview.cpp and luaengine.cpp – a leak is when it loses track of allocations and never releases memory.
> So the "j" setting from my examination determines how much instances of cc1plus are > used when compiling Mame. I decided to check memory behavior for only one cc1plus > instance and the memory used for this application just kept rising until it was > finished with an emumem file. Highest I seen it go up to so far was about 5 GB of ram > used compiling emumem_mview.cpp. > > What I did was use Resource Monitor to inspect cc1plus.exe's memory usage. Wait until > cc1plus compiles the emumem files and watch the ram usage rise.
Well yeah, compiling large, complex functions with lots of templates uses a lot of memory.
> Edit: Seems to be a known issue: > https://github.com/mamedev/mame/commit/5...891bc1008ed94.. > Going to have to compile with two cc1plus instances "-j2" until this bug is fixed for > good.
That has nothing to do with RAM usage when compiling, that issue would cause MAME to crash with a stack overflow on start. It’s completely unrelated, and it is fixed.
|
|