Author Topic: safe_malloc failed on allocation of bytes [FIXED]  (Read 12322 times)

Shifty

  • Posts: 75
  • Turrets: +0/-0
safe_malloc failed on allocation of bytes [FIXED]
« 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?
« Last Edit: September 12, 2011, 03:58:25 am by your face »

Xedoh

  • Posts: 84
  • Turrets: +4/-1
Re: safe_malloc failed on allocation of bytes
« Reply #1 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.
Wisdom starts where knowledge ends.

Ingar

  • Tremulous Developers
  • *
  • Posts: 554
  • Turrets: +302/-7
    • Ingar's projects on the Web
Re: safe_malloc failed on allocation of bytes
« Reply #2 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)
« Last Edit: September 06, 2011, 06:30:48 pm by Ingar »

your face

  • Community Moderators
  • *
  • Posts: 3843
  • Turrets: +116/-420
Re: safe_malloc failed on allocation of bytes
« Reply #3 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.
spam spam spam, waste waste waste!

Xedoh

  • Posts: 84
  • Turrets: +4/-1
Re: safe_malloc failed on allocation of bytes
« Reply #4 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.
Wisdom starts where knowledge ends.

Shifty

  • Posts: 75
  • Turrets: +0/-0
Re: safe_malloc failed on allocation of bytes
« Reply #5 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
« Last Edit: September 06, 2011, 10:59:31 pm by Shifty »

your face

  • Community Moderators
  • *
  • Posts: 3843
  • Turrets: +116/-420
Re: safe_malloc failed on allocation of bytes
« Reply #6 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
spam spam spam, waste waste waste!

Shifty

  • Posts: 75
  • Turrets: +0/-0
Re: safe_malloc failed on allocation of bytes
« Reply #7 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?

c4

  • Posts: 554
  • Turrets: +9/-22
Re: safe_malloc failed on allocation of bytes
« Reply #8 on: September 07, 2011, 03:26:02 am »
I think bobtools had a script for that.  Not sure though.
eh, i prefer gregorian.net chat better than this. NO download and its LIVE!
 :basilisk: FTW![wiki]basilisk[/wiki]

Shifty

  • Posts: 75
  • Turrets: +0/-0
Re: safe_malloc failed on allocation of bytes
« Reply #9 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.

Shifty

  • Posts: 75
  • Turrets: +0/-0
Re: safe_malloc failed on allocation of bytes
« Reply #10 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.