🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.c
Article #308566

Re: Jak sprawdzić czy new przydzielił mi pamięć?

#308566
From: M.M.
Date: Thu, 19 May 2016 06:38
17 lines
1852 bytes
On Wednesday, May 18, 2016 at 11:22:13 AM UTC+2, Borneq wrote:
> W dniu 18.05.2016 o 11:18, Borneq pisze:
> > #include <stdint.h>
> >
> > int main()
> > {
> >     uint8_t *bigbuf;
> >     bigbuf = new uint8_t[4000000000*1024 * 1024 * 1024];
> >     return 0;
> > }
> >
> > Ani nie ma wyjątku ani bigbuf nie jest NULL. Co zrobić?
> 
> Jest wyjątek, a ta duża liczba po prostu się zawijała i okazywała się 
> mniejszą.

bigbuf = new uint8_t[4000000000ull * 1024 * 1024 * 1024];
Technical Details
Message-ID: <9579b44f-b632-4144-b947-343a1880e5af@googlegroups.com>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!goblin2!goblin.stu.neva.ru!feeder.erje.net!2.us.feeder.erje.net!news.glorb.com!11no4998850qgt.0!news-out.google.com!13ni760qgj.0!nntp.google.com!11no4998847qgt.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
References: <nhhc0e$oqe$1@node2.news.atman.pl> <nhhc84$p40$1@node2.news.atman.pl>

Show Full Headers
Complete Article Headers
X-Received: by 10.129.131.136 with SMTP id t130mr31959569ywf.2.1463639894714;        Wed, 18 May 2016 23:38:14 -0700 (PDT)
X-Received: by 10.140.98.247 with SMTP id o110mr1368650qge.18.1463639894689; Wed, 18 May 2016 23:38:14 -0700 (PDT)
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!goblin2!goblin.stu.neva.ru!feeder.erje.net!2.us.feeder.erje.net!news.glorb.com!11no4998850qgt.0!news-out.google.com!13ni760qgj.0!nntp.google.com!11no4998847qgt.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups: pl.comp.lang.c
Date: Wed, 18 May 2016 23:38:10 -0700 (PDT)
In-Reply-To: <nhhc84$p40$1@node2.news.atman.pl>
Complaints-To: groups-abuse@google.com
Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=178.37.232.66; posting-account=xjvq9QoAAAATMPC2X3btlHd_LkaJo_rj
NNTP-Posting-Host: 178.37.232.66
References: <nhhc0e$oqe$1@node2.news.atman.pl> <nhhc84$p40$1@node2.news.atman.pl>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <9579b44f-b632-4144-b947-343a1880e5af@googlegroups.com>
Subject: Re: Jak sprawdzić czy new
 przydzielił mi pamięć?
From: "M.M." <mmarszik@gmail.com>
Injection-Date: Thu, 19 May 2016 06:38:14 +0000
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit