comp.lang.ada
 help / color / mirror / Atom feed
From: Robert A Duff <bobduff@shell01.TheWorld.com>
Subject: Re: Size of Vector limited to 1024 MB of Heap Size
Date: Tue, 24 Jun 2008 16:38:31 -0400
Date: 2008-06-24T16:38:31-04:00	[thread overview]
Message-ID: <wcc3an2r2k8.fsf@shell01.TheWorld.com> (raw)
In-Reply-To: 2ad55f4f-a463-4542-aa76-b1b6d20d9168@d45g2000hsc.googlegroups.com

Gene <gene.ressler@gmail.com> writes:

> Your code thrashes the heap pretty hard.  Containers doubles the size
> of the vector's internal array each time it runs out.  So the 2Gb
> request means 1Gb is already in use.  Dont' know about your malloc(),
> but it's easy to see that a 1Gb allocated block in a 4Gb arena can
> preclude a further 2Gb allocation.

Good point.  Note that when you grow from 1GB to 2GB, you have both
allocated for the time it takes to copy the data over.  That won't work
if the user part of the address space is limited to 3GB.  Some part of
that 3GB is used for other stuff.  Plus the heap might well be
fragmented.

A better test of how much you can allocate would allocate a whole bunch
of smaller objects.

- Bob



  reply	other threads:[~2008-06-24 20:38 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-24  8:44 Size of Vector limited to 1024 MB of Heap Size Dennis Hoppe
2008-06-24 15:03 ` Adam Beneschan
2008-06-24 17:32 ` Robert A Duff
2008-06-24 18:55 ` Peter Schildmann
2008-06-25 15:13   ` Dennis Hoppe
2008-06-25 17:26     ` (see below)
2008-06-25 21:09       ` Dennis Hoppe
2008-06-24 20:03 ` Gene
2008-06-24 20:38   ` Robert A Duff [this message]
2008-06-24 22:53 ` anon
2008-06-24 23:36   ` Extra footnote: " anon
2008-06-25  0:11     ` tmoran
2008-06-25  2:49       ` anon
2008-06-25  8:04         ` christoph.grein
2008-06-25 10:39 ` Peter Schildmann
2008-06-25 15:29   ` Dennis Hoppe
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox