delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/09/22/17:22:02

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <20000922211826.22007.qmail@web1206.mail.yahoo.com>
Date: Fri, 22 Sep 2000 14:18:26 -0700 (PDT)
From: Chris Jones <chrisjones9 AT yahoo DOT com>
Subject: "out of memory" error
To: cygwin AT sourceware DOT cygnus DOT com
MIME-Version: 1.0

I am having problems with memory allocation using
Cgywin1.1.  I complied the following code with g++ and
when ran crashes and prints "out of memory".  The same
code runs fine with Cygwinb20.  I am running on a
Windows 2000 1GHz Pentium III machine with 500MB RAM. 
I am confused as to why it crashes with Cygwin1.1 and
NOT with Cygwinb20, and why it thinks it is out of
memory when it is not even approaching the available
limit.  Is there some limit Cygwin1.1 sets on memory
usage?

#include <vector.h>

void main(void) {
        vector<int> a[100];

// Crashes at i = 33
        for(int i=0;i<150;i++) {
          cout << "i = " << i << endl;
          a[i].reserve(1000000);
        }
}

The same idea, except using a series of push_backs
instead of reserve ends in the same way.  A list with
a series of push_backs also crashes.

I appreciate any help anyone can give.

Chris


__________________________________________________
Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
http://im.yahoo.com/

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


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