Boost logo

Boost :

Subject: Re: [boost] Advice sought on memory allocation latency reduction C++ standard proposal
From: Jeffrey Lee Hellrung, Jr. (jhellrung_at_[hidden])
Date: 2010-09-22 16:07:18


On 9/22/2010 12:49 PM, Niall Douglas wrote:
> Dear Boost Devs,
>
> I am hoping to gain feedback on an ISO C++ standard library proposal
> I hope to submit. It consists of a rationale
> (http://mallocv2.wordpress.com/) which shows how growth in RAM
> capacity is exponentially outgrowing the growth in RAM access speed.
> The consequences are profound: computer software which has always
> been written under the assumption of scarcity of RAM capacity will
> need to be retargeted to assume the scarcity of RAM access speed
> instead.
[...]
> The proposal comes in two parts: (i) The C proposal
> (http://mallocv2.wordpress.com/the-c-proposal-text/) which extends
> the classic 1979 malloc API to enable realloc() to speculatively
> attempt in-place allocation resizing and (ii) the C++ proposal
> (http://mallocv2.wordpress.com/the-cpp-proposal-text/) which extends
> std::allocator<> with batch allocation and deallocation member
> functions along with a reallocate() member function. These work much
> as expected and are intended for STL implementations - I have given a
> sample std::vector<>::reserve() implementation for the Dinkumware STL
> which attempts an in-place extension before performing a move
> construction of the vector contents.
>
> I am going to guess that these member functions will be fairly
> uncontroversial - reallocate() in particular has been in the SGI STL
> for a while, though in an unhelpful form which is basically a
> realloc() wrapper.
[...]

Are you familiar with Ion Gaztanaga's "allocplus" proposal [1]? Without
actually yet reading your proposal, yours and Ion's sound similar, or at
least have some overlap, based on the above description. There is also
a similar, earlier proposal from Howard Hinnant referenced in [1].

Apologies if these aren't actually relevant and/or you're already
familiar with these proposals.

- Jeff

[1] http://www.drivehq.com/web/igaztanaga/allocplus/


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk