Malloc bug?

Paul Schinder schinder at pobox.com
Wed Jul 19 06:54:29 EST 2000


At 3:40 PM -0500 7/18/00, Nathan Ingersoll wrote:
>I've been working on a GTK program for a while now, and I've been
>experiencing segfaults within malloc. I was under the impression that
>malloc should always return successfully (at least that's what the man
>page says).

No, it shouldn't.  If there's no memory left, it will return NULL.
Software should be checking for this.

>Any ideas what may be causing this? I don't know if this has
>anything to do with it, but the kernel I was using generated lots of
>vm_do_try_free_pages failed error logs but not necessarily during program
>execution.
>
>---------------------------------------------------------------------------
>|   Nathan Ingersoll             |   Computer Science/Mathematics         |
>|   mailto: ningerso at d.umn.edu   |   University of Minnesota-Duluth       |
>|   http://umn.edu/~ningerso     |   http://www.d.umn.edu                 |
>---------------------------------------------------------------------------
>
>

--
--
Paul Schinder
schinder at pobox.com

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc-dev mailing list