Boost logo

Boost :

Subject: Re: [boost] [Root Pointer] Benchmark
From: Phil Bouchard (philippeb8_at_[hidden])
Date: 2016-03-14 08:33:45


On 03/14/2016 08:17 AM, Glen Fernandes wrote:
>
> If I want to use block_ptr in that style above, with a
> "small_object_allocator" instance constructed from a
> "small_object_allocator_state" like "a1", _without_ having to write
> any additional classes, what would the line look like?
>
> proxy_ptr<int> p3(new block<int, small_object_allocator<int> >(/*
> some place to specify 'a1' here? */));

Indeed, I need to add a way to pass a1 in the constructor.

> And then are you guaranteeing that 'new' expression in that
> construction of proxy_ptr will also use a 'small_object_allocator{a1}'
> allocator instance for dynamic allocation, and not '::operator
> new(std:;size_t)'?

Yes because I use:
node<int, small_object_allocator<int> >::operator new ()

And not:
::operator new ()


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