Author Topic: AllocTriangulation: malloc failed  (Read 1883 times)

Narga

  • 68 Carbine
  • Posts: 401
AllocTriangulation: malloc failed
« on: November 23, 2012, 10:42:05 AM »
I knew I had a similar problem before, but I built a new computer with 8GB of DDR3 RAM. The compile log is attached to this post.

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: AllocTriangulation: malloc failed
« Reply #1 on: November 23, 2012, 04:57:22 PM »
Whatever you're doing might be using more than 2 gigs of memory.

Narga

  • 68 Carbine
  • Posts: 401
Re: AllocTriangulation: malloc failed
« Reply #2 on: November 23, 2012, 08:51:30 PM »
Whatever you're doing might be using more than 2 gigs of memory.

According to my desktop gadget, When I compile the map I'm using about 50% of my RAM and 100% of my CPU.

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: AllocTriangulation: malloc failed
« Reply #3 on: November 24, 2012, 09:53:09 PM »
How much ram do you have?

Narga

  • 68 Carbine
  • Posts: 401
Re: AllocTriangulation: malloc failed
« Reply #4 on: November 25, 2012, 01:50:42 AM »

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: AllocTriangulation: malloc failed
« Reply #5 on: November 27, 2012, 06:55:29 PM »
Sorry, missed that.

The lighting is a 32bit program, which means it can only utilize 2 or 4 gigs of memory.  If you're using 50% of your memory, you're at the absolute limit of what a 32bit program can access, thus the memory allocation will fail.  Not sure what you're doing that would require that much memory, but... you're going to have to change something in your map so it can be lit.

Narga

  • 68 Carbine
  • Posts: 401
Re: AllocTriangulation: malloc failed
« Reply #6 on: November 28, 2012, 01:47:58 AM »
Sorry, missed that.

The lighting is a 32bit program, which means it can only utilize 2 or 4 gigs of memory.  If you're using 50% of your memory, you're at the absolute limit of what a 32bit program can access, thus the memory allocation will fail.  Not sure what you're doing that would require that much memory, but... you're going to have to change something in your map so it can be lit.

The room is a simple box. Maybe it's a big box.

Edit: I did a final compile (high quality) on the sample map and it compiled successfully faster than I could blink my eyes!

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: AllocTriangulation: malloc failed
« Reply #7 on: November 29, 2012, 12:21:21 AM »
Do you have the textures scaled way down or something?  Note that the texture scale also affects the lightmap scale.

Narga

  • 68 Carbine
  • Posts: 401
Re: AllocTriangulation: malloc failed
« Reply #8 on: November 29, 2012, 02:27:23 PM »
Do you have the textures scaled way down or something?  Note that the texture scale also affects the lightmap scale.

No, I'm pretty sure I got the compile error because the room was too tall. I made it shorter and it compiled successfully.

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: AllocTriangulation: malloc failed
« Reply #9 on: November 29, 2012, 11:43:47 PM »
For very large areas, you should consider scaling up your textures.

A) It makes the texture repeating pattern less noticeable.
B) It cuts down on the lightmap resolution so its possible to compile large maps.
C) It cuts down on how much the map is broken up, reducing r_speeds.