delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/11/14/04:50:54

From: Pierre DOT Humblet AT eurecom DOT fr (Pierre A. Humblet)
Subject: Re: Why would malloc return NULL?
14 Nov 1998 04:50:54 -0800 :
Message-ID: <3.0.5.32.19981113173902.008bdb20.cygnus.gnu-win32@pop.ne.mediaone.net>
Mime-Version: 1.0
To: gnu-win32 AT cygnus DOT com

I have got exactly the same problem when porting gnu spell-1.0 to b19, see
ftp://ftp.franken.de/pub/win32/develop/gnuwin32/cygwin32/porters/Humblet_Pie
rre_A/B19/ispell.readme

The problem persists in b20. It seems to be related to the number of
outstanding malloc calls and not to the total memory allocated. In my case
it was easier to modify the source to free blocks ASAP rather than trying
to understand and fix b19...

Pierre


At 04:18 PM 11/12/98 -0500, francesd AT adstii DOT com wrote:
>
>We have ported a large Unix application to NT using Cygwin (b19) and
>seem to have a problem with malloc returning NULL when there is still
>plenty of unused memory.  The machine has 256M of RAM, and 512M of
>swap.  We attempted to allocate 16 bytes when malloc returned NULL,
>and according to the task manager, we have over 130M of unused
>physical RAM.  I tried linking in the mmalloc library to track down
>what was causing this, but that just seemed to delay the problem.  To
>make matters worse, everything ran just fine when in the debugger (and
>mmalloc was linked in).  Also, the problem goes away when you compile
>with debug information.
>
>In Unix, the only reasons I would expect for malloc to return NULL is
>if the system ran out of memory or someone trashed the memory
>allocation tables.  I think I can rule out running out of memory
>(unless someone can suggest why this could happen with that much space
>left), so are there any other reasons why this could happen in Cygwin?
>
>Thanks,
>-Derrick
>
>-- 
>Derrick Franceschini                    SAIC -- ADST II -- ModSAF
>francesd AT adstii DOT com                        Phone (407)-306-4113
>                                           Fax   (407)-306-4075

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019