This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: High memory usage when compiling array of shared_ptr in gcc 4.6.2+
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: Jens Bauer <jens at plustv dot dk>
- Cc: Philipp Savun <philipp dot savun at gmx dot de>, gcc-help at gcc dot gnu dot org
- Date: Fri, 6 Apr 2012 15:06:26 +0100
- Subject: Re: High memory usage when compiling array of shared_ptr in gcc 4.6.2+
- References: <4F7ED9D8.5010003@gmx.de> <20120406140958801258.da5e8285@plustv.dk>
On 6 April 2012 13:09, Jens Bauer wrote:
> Hi Philipp,
>
> I'd say that's sloppy coding (in my opinion).
> You should really use malloc for huge buffers, not statically allocated variables.
*ahem*
Maybe std::vector<shared_ptr<SomeClass>> but not malloc.