Re: memory problems

Jim Nance (jlnance@avanticorp.com)
Thu, 24 Jul 1997 14:29:49 -0400 (EDT)


> problems with Linux's memory management. I have an X based
> application (with audio and video) that requires a lot of memory. It
> works
> fine for a certian period of time and crashes (dumps core). It has
> turned
> out be that the seg fault occurs in a malloc routine. The application
> can no longer get memory !! inspite of the fact that there is 128 Mbyte

This almost always indicates that you have corrupted malloc()'s data
structures by either:
- Freeing memory that malloc() did not give you.
- Writting to free()d memory.
- Freeing memory more than once.
- Writting to memory outside of the blocks you malloc()ed.

You might want to try looking for it with the Electric Fence package:

http://eigen.ee.ualberta.ca/hppd/hpux/Languages/ElectricFence-2.0.5

Hope this helps,

Jim