Tremulous Forum

Media => Mapping Center => Topic started by: Shifty on September 06, 2011, 06:38:24 am

Title: safe_malloc failed on allocation of bytes [FIXED]
Post by: Shifty on September 06, 2011, 06:38:24 am
I tried to compile a map in final settings and got this error:
Quote
--- BasePortalVis (34914) ---
0...1...2...3...4...5...6...7...8...9... (6)
      8 average number of passages per leaf
    636 MB required passage memory

--- CreatePassages (34914) ---
0...1...2...3...4...5...6...7...8...9************ ERROR ************
safe_malloc failed on allocation of 4376 bytes
How can I fix this?

Thanks


EDIT:
Oh, so is this a RAM issue? =/ How could I reduce the ram required?
Title: Re: safe_malloc failed on allocation of bytes
Post by: Xedoh on September 06, 2011, 12:51:16 pm
I'm not sure, but I think I had this problem already. Add "-lomem" to the compile settings (the problem I had concerned the lights, so i added it there, but your problem seems to be in the vis part, you might want to try setting -lomem in both.
Title: Re: safe_malloc failed on allocation of bytes
Post by: Ingar on September 06, 2011, 06:23:25 pm
Your map has a problem, vis is way too complex.

To compare: the same lines from vega-beta1:
Code: [Select]
--- BasePortalVis (3386) ---
0...1...2...3...4...5...6...7...8...9... (0)
      4 average number of passages per leaf
      3 MB required passage memory

--- CreatePassages (3386) ---
0...1...2...3...4...5...6...7...8...9... (1)
Title: Re: safe_malloc failed on allocation of bytes
Post by: your face on September 06, 2011, 08:56:10 pm
Try using less textures, convert tgas to jpgs, don't use any 1024x1024 textures.  Find/replace all copied textures.  Go easy on eyecandy, you might have to remove excess detail. :(

Save as, and then try experimenting with changes.
What is your map's brushcount?  Try to stay under 16k.
Title: Re: safe_malloc failed on allocation of bytes
Post by: Xedoh on September 06, 2011, 10:20:24 pm
Hmm, well I've checked the error I had again: It was in during the light-phase.
If it is the vis that is too complex, could detailing solve the problem?

Btw, what is the problem with 16k+ brushes? Specula b4 has 17335 and compiled just fine.
Title: Re: safe_malloc failed on allocation of bytes
Post by: Shifty on September 06, 2011, 10:55:36 pm
My map only has about 4k brushes, and it only uses default textures. Whats that bout the visibility? I have never...done any of that..before, what do I need to do?

If you want to actually look at the map (in game) you can download it:
http://www.mediafire.com/?3y5tx3hn1h987a4
/devmap vantage1_b2
Title: Re: safe_malloc failed on allocation of bytes
Post by: your face on September 06, 2011, 11:29:37 pm
you are in luck, it sounds like you just need to detail brush your map.  this should help: http://tremulous.net/forum/index.php?topic=9719.0

btw do you have any huge rooms being lit with a skybox?

Btw, what is the problem with 16k+ brushes? Specula b4 has 17335 and compiled just fine.
I dunno, I read that somewhere I think. (nexus has 18k+ brushes)  some people like me suck at having optimized brushwork and need to stick below a certain amount of brushes I guess. :P
Title: Re: safe_malloc failed on allocation of bytes
Post by: Shifty on September 06, 2011, 11:32:47 pm
Bah....I hate detailing brushes :P Is there a quick way to detail all brushes that arent in contact with the void?
Title: Re: safe_malloc failed on allocation of bytes
Post by: c4 on September 07, 2011, 03:26:02 am
I think bobtools had a script for that.  Not sure though.
Title: Re: safe_malloc failed on allocation of bytes
Post by: Shifty on September 07, 2011, 08:18:13 am
Meh, the map is going to need a clean up for b3 anyway. I will just work my way though the map and do it myself.
Title: Re: safe_malloc failed on allocation of bytes
Post by: Shifty on September 07, 2011, 09:22:37 am
It would appear I have it under control. I have got it down to 471mb, and can now compile fine, and I have much more detailing to go. Thanks guys :D I shall be sure to post the map on forums once I get a decent beta going.