Boost logo

Boost :

Subject: Re: [boost] variant2 never empty guarantees
From: Andrzej Krzemienski (akrzemi1_at_[hidden])
Date: 2017-06-09 07:29:58


2017-06-09 8:09 GMT+02:00 degski via Boost <boost_at_[hidden]>:

> On 9 June 2017 at 02:05, Gavin Lambert via Boost <boost_at_[hidden]>
> wrote:
>
> > ... since assignment is not really expected to throw for any reason other
> > than out of memory.
> >
>
> Are there really any modernish OSes that *do* run out of memory? Stack
> space (on those type of machines) maybe, but now we are talking programming
> error, I would say, because that situation is foreseeable (and should be
> expected) by the programmer. From what I understand, if one is programming
> for embedded systems or iot-devices, dynamic allocation is not the common
> way to do things and all memory required is allocated upon boot.
>

When you are implementing a "cache": you want to store the most "hot" part
of your database data in RAM on a dedicated server, which obviously cannot
cache the entire database. You have to make some predictions, how much data
you can accept. If the actual data is bigger, you probably want to
terminate with apologize message.

Regards,
&rzej;


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