Log in

View Full Version : SetMemoryMax() causing problems?


okc_smoker
22nd August 2008, 21:51
I recently added another 1GB stick of memory to bring my total to 2GB. I just tried running a script with SetMemoryMax(1024) and every time I try to load the script in VDubMod I get a fatal error saying "This application has to close unexpectedly" and VDub shuts down. If I lower it to 512 it works fine. Only about 400MB of RAM is is use at the time so I'm not running out of memory or anything. Any ideas what might be causing this?

thetoof
23rd August 2008, 06:09
Dunno what could be causing it... maybe it's about the percentage of your total memory that is allocated for one process...?
setmemorymax(1536) with 4GB works perfectly

josey_wells
23rd August 2008, 13:40
I have run into problems with SetMemoryMax set to high when trying to process Blu-Ray movies I kept getting AviSynth errors.

According to IanB SetMemoryMax only controls memory for caching of video frames, so it doesn't need to be set really high. I have it set to 256 MB.

The other issue is that 32 bit processes are limited to a total of 2 GB of memory so if the script is using a lot of memory and set memory max is high the process will run out of memory and fail.