memory problem

memory problem

Anonymous
Not applicable
398 Views
1 Reply
Message 1 of 2

memory problem

Anonymous
Not applicable
My script keeps running out of memory. I have turned off undo, deleted construction history and I clear my arrays after every use to free memory. Does anyone know what might be causing this and/or how to flush the memory? Below is the info from the output window, hope it helps.

mental ray for Maya 9.0
mental ray: version 3.6.1.6, 17 Jul 2007, revision 21668
====================================
Cause of memory exception
====================================
74.195 Mb Free Memory
5.047 Mb Free Swap
1.890 Mb Size of alloc
10.000 Mb Low Memory Threshold
====================================
Memory use when exception was thrown
====================================
====================================
8639423 Page faults
7667.793 Mb Max resident size
23275.891 Mb Peak total size(Estimated)
3640.245 Mb Peak arena size
====================================
23277.738 Mb Current
675.414 Mb Object Arrays
2504.803 Mb Arrays
395.379 Mb POLY_DRAW_CACHE_DATA
9.072 Mb Transforms
42.969 Mb MEL
36.424 Mb Data Blocks
0.135 Mb arguments
1.958 Mb POLY_DRAW_CACHE_STATIC_DATA
0.125 Mb Keys
====================================
0 Likes
399 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
You just say that your script runs out of memory, without seeing the script I can not say exactly why this is happening.
It looks like you create some very large arrays and constructing some polygon meshes that occupy a lot of memory.
- If the crush happens every time you run the script then there is a problem with the variables that you use and the objects that you create from the script, they use to much memory, maybe you could clear some of them more often, or not use a lot of global variables.
- If the crush happens after several runs of the same script then the problem could be that you use to much print commands, or you forget to clear some global arrays.

Some MEL ways to clear memory:
1. flushUndo
2. clearCache
3. clear(<<array_variable>>)

If you can, you should post here the script or PM it to me in order to give a more elaborate opinion.

Hope this helps.
0 Likes