From: "Niklas Pettersson" Newsgroups: comp.os.msdos.djgpp Subject: SV: does DJGPP throw bad_alloc if new failes?? Date: Wed, 12 Jan 2000 12:45:19 +0100 Organization: Lund Institute of Technology, Sweden Lines: 18 Message-ID: <85hpja$k2v$1@news.lth.se> References: NNTP-Posting-Host: npedt97.univ.vxu.se X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com It does throw bad_alloc.. Just include . #include #include int main() try { while (1) void *temp = new char[60000]; } catch (bad_alloc) { cerr << "Not enough memory\n"; }