Newsgroups: fj.lang.c
Path: galaxy.trc.rwcp.or.jp!jaist-news1!coconuts.jaist!wnoc-tyo-news!aist-nara!wnoc-kyo-news!kuis-news!s.u-tokyo!news.tisn.ad.jp!news.nips.ac.jp!mich
From: mich@ims.ac.jp (Yuji Michihiro)
Subject: new and delete of c++
Sender: news@nips.ac.jp
Message-ID: <CruuLC.4A0@nips.ac.jp>
Date: Thu, 23 Jun 1994 14:51:11 GMT
Lines: 37
Nntp-Posting-Host: 133.48.182.100
Organization: National institute for physiological sciences
X-Newsreader: mnews [version 1.17] 1994-01/27(Thu)
Xref: galaxy.trc.rwcp.or.jp fj.lang.c:1446
X-originally-archived-at: http://galaxy.rwcp.or.jp/text/cgi-bin/newsarticle2?ng=fj.lang.c&nb=1446&hd=a
X-reformat-date: Mon, 18 Oct 2004 15:18:22 +0900
X-reformat-comment: Tabs were expanded into 4 column tabstops by the Galaxy's archiver. See http://katsu.watanabe.name/ancientfj/galaxy-format.html for more info.

$B!!F;9-!wJ,;R8&$H?=$7$^$9!#%K%e!<%9$KEj9F$9$k$N$O$O$8$a$F$J$N$G!"(B
$B$*$*$\$1$J;v!J%^%J!<0cH?$H$+!K$7$F$$$?$i65$($F$/$@$5$$!#(B

$B!!#g!\!\$GG[Ns$NF0E*3NJ]!&3+J|$r=q$-$^$7$?!#<B?t$N$H$-$O$&$^$/(B
$B3+J|$G$-$k$N$G$9$,!"J#AG?t$@$H$&$^$/$$$-$^$;$s!#0J2<$,%5%s%W%k(B
$B$G!"(B#define comp $B$r$O$:$9$H@5>o$KAv$j$^$9$,!"$D$1$k$H(B
Vitual memory exceeded in 'new'
$B$H8@$C$F;_$^$j$^$9!#(B
$B!]!]!]!]!]!]!]!]!]!]!]!]!]!]!]!]!]!]!]!]!]!]!]!]!]!]!]!]!]!]!](B
#include <complex.h>

//#define comp

main()
{
   int i;
#ifdef comp
   complex* p;
#else
   double* p;
#endif

   for(i=0; i<=50; i++){
#ifdef comp
      p=new complex[500000];
#else
      p=new double[1000000];
#endif
      delete p;
   }
}
$B!]!]!]!]!]!]!]!]!]!]!]!]!]!]!]!]!]!]!]!]!]!]!]!]!]!]!]!]!]!]!](B
$B!!#g!\!\$N%P!<%8%g%s$O#2!%#4!"%^%7%s$O#H#P#9#0#0#0!?#7#3#5!"(B
$B#O#S$O#H#P!]#U#X#9!%#0$G$9!#(B
$B!!$3$l$C$F%P%0$J$s$G$7$g$&$+!#(B
$B!!2?$+B>$KNN0h$r3+J|$9$k<j$O$"$j$^$9$+!#(B
$B!!$h$m$7$/$*4j$$$7$^$9!#(B
