Hlrad Using 16x Too Much Memory
Jedediah
Join Date: 2003-01-27 Member: 12847Members
I'm compiling a map with ~88000 patches with the -sparse and -nomatrix switches which I believe should minimize memory usage. About half way through the MakeScales phase, the memory reported by the hlrad.exe process (in task manager) goes up to 100MB but the "mem usage" and "commit charge" in the performance tab reports 1.8GB! Indeed, my pagefile.sys is expanding to about that size. At this point, with all the swapping going on, hlrad doesn't even get any CPU time (the CPU usage is reported as 3%) and it eventually aborts with a memory allocation failure.
Without hlrad running, my mem usage is at about 200MB. So if you do the math, 1800MB - 200MB = 1600MB = 100MB * 16. This suggests to me that there is some sort of overhead cost to hlrad memory allocation that is 16x the actual memory it uses. Obviously this can't be right.
Anyone know what's going on here?
Without hlrad running, my mem usage is at about 200MB. So if you do the math, 1800MB - 200MB = 1600MB = 100MB * 16. This suggests to me that there is some sort of overhead cost to hlrad memory allocation that is 16x the actual memory it uses. Obviously this can't be right.
Anyone know what's going on here?
Comments
what the problem is you are facing i have no idea. have you tried to just let it run? i never encountered a swapfile more then 1 gb big through rad, but you have only 256 mb ram wich could be the cause for this. The amount of memory rad uses can get really big. i had it while compiling a rather "big " map (not in size but enclosed room) where my cpu usage dropped very low since my PC was trying to move the data around and my swapfile grew and grew while my ram was 100% full. took about 40 minutes then the "Normal" calculation resumed, memory usage went down and cpu up. This happen while building VisLeafs. wasnt a problem , it was absolutely normal.
if so.. let me know I can e-mail it, it's only 46kb.
Axe
I want your PC !!!
use the -chart command and tell me your
visdata ... .../2097152 ( ....%)
please.
Is this what you want?
visdata [variable] 4038/2097152 ( 0.2)
Also FYI, these are the flags I'm using:
FLAGS = -estimate -low -verbose
CSGFLAGS = -hullfile C:\Games\Halflife\ns\nshulls.txt
BSPFLAGS = -chart
VISFLAGS = -full -chart
RADFLAGS = -sparse -extra -bounce 4 -smooth 80 -notexscale -texchop 16 -coring 0.2 -chart
I'm compiling with a makefile from a cmd.exe prompt on windows 2000
Yes, I'm fairly certain it shouldn't be using 2GB of ram to compile this map. My best guess is this is a problem with the way hlrad is allocating memory. Perhaps somehow it is allocating off the heap in such a way that tons of memory gets wasted. I have no idea why this is only happening to me though. Do you mind if I ask what your command line options are, number of brushes in your map and how you are running the compile tools?
EDIT: er, I mean number of patches