safe_malloc failed in q3map2 2.5.15 light phase


(]UBC[ McNite) #21

Ok here we go… i was able to reproduce the safe_malloc: its when i have about 20% of the whole terrain in one func_group using the terrain texture on it. I did several compiles and added a bit of terrain after each step, and that s where it failed.

Leaves me with a serious question mark on my forehead though… do i need to go n buy RAM now?


(SCDS_reyalP) #22

I’d suggest trying lomem first. q3maptoolz should have an option to add arbitrary command line options in somewhere. If it doesn’t, use a batch file.

Ram is quite cheap these days. Even if you can convince windows to use your available virtual memory, it would most likely be dog slow.


(Twisted0n3) #23

So it’s a Windows problem?

Buying RAM isn’t what I’d recommend. “Cheap” is relative – upping my system from 512 to 1GB cost about $300 a year or so ago. That’s not exactly chump change, at least not on my income. Also, if you have a full GB in there, I don’t think XP Home will recognize a larger amount. You’d have to shell out maybe $500 to go to 2GB and an additional $300 to get XP Pro, or else try to figure out how to make all this stuff work on Linux. You could ultimately be looking at spending a grand, though more likely half that. For faster compiles? Is it really worth it?


(]UBC[ McNite) #24

I m using W2K… XP is the suck imo :smiley:

And the question is not about faster compile, it is about to compile or not to :angry:

And I m sorry but i m a batch-noob. Can anybody plz post the code for a batchfile with the -lomem switch? That would be a great help.


(Twisted0n3) #25

With the lomem switch it becomes about faster compile.


(Shaderman) #26

Here’s a simple bsp/vis/light batch file:

"Full path\q3map2.exe" -meta -game et "Full path\yourmap.map"
"Full path\q3map2.exe" -vis -saveprt -game et "Full path\yourmap.bsp"
"Full Path\q3map2.exe" -light -lomem -game et "Full path\yourmap.bsp"

Change the “Full path” and “yourmap” parts and save the file with the ending .bat.

The -lomem switch is available in Q3Map2Toolz and you’re able to save a compile sequence in a batch file :wink:

Shaderman


(SCDS_reyalP) #27

Microsoft would probably claim it is a feature, or as designed at least.

Buying RAM isn’t what I’d recommend. “Cheap” is relative – upping my system from 512 to 1GB cost about $300 a year or so ago.

Then you either have something very fancy,something uncommon, or you got ripped off:
http://www.newegg.com/Product/Product.asp?Item=N82E16820227039
1 GB of brand name DDR 400, from a reputable dealer, for under $90. It was slightly more a year ago, but not that much.


(]UBC[ McNite) #28

Hmmm just another thing: When I was cleaning up the map I found that my co-mapper had a good deal of unclean brushwork imported (lots of brushes with the edges not being on a grid). So I cleaned that up and got rid of a good deal of his miniature-brushwork too. Now i can easily compile the map with the whole terrain as 1 terrain func_group. No safe_malloc, and the LIGHT stage even takes like 200 secs less too.

So my conclusion: unclean brushwork (which you get easily when u don’t watch out using the clipper tool) eats a lot of memory during the LIGHT stage and can be a cause for a safe_malloc.