delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/02/12/11:39:01

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs
Date: Wed, 12 Feb 2003 11:36:34 -0500 (EST)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Kris Warkentin <kewarken AT qnx DOT com>
cc: cygwin AT cygwin DOT com
Subject: Re: Malloc failing too soon under XP/2000
In-Reply-To: <053001c2d2b3$a64a95c0$0202040a@catdog>
Message-ID: <Pine.GSO.4.44.0302121133400.14791-100000@slinky.cs.nyu.edu>
Importance: Normal
MIME-Version: 1.0

On Wed, 12 Feb 2003, Kris Warkentin wrote:

> I'm running Windows XP with 1/2GB RAM and 2GB swap.  Running Cygwin 1.3.18.
> Consider the following program to use as much memory as possible:
>
> #include <stdio.h>
> #include <malloc.h>
>
> int
> main()
> {
>         void *x;
>         unsigned long long mem=0;
>
>         while((x=malloc(500000)) != NULL){
>                 mem += 500000;
>                 memset(x, 0, 500000);
>                 printf("allocated %u\n", mem);
>         }
>         return 0;
> }
>
> If I compile and run this, it consistently stops at about 780MB.  If I
> compile with -mno-cygwin, it doesn't fail until almost 2GB have been
> allocated.
>
> Any comment?  Is there some sort of flag I can compile with to make the
> allocator more aggressive?  The situation it's failing in is one where a
> very large library is being linked and ld is running out of memory in spite
> of quite a bit being available.
>
> cheers,
>
> Kris

Well, for one, 1.3.20 is out.  You might try that -- there have been some
changes to the memory management code, see if they fixed your problem.
For another, there is no need to copy Doug Lea on this.  This is most
probably a Cygwin-specific issue, and belongs on the Cygwin list.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

Oh, boy, virtual memory! Now I'm gonna make myself a really *big* RAMdisk!
  -- /usr/games/fortune


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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