Boost logo

Boost :

From: Gregory Colvin (gregory.colvin_at_[hidden])
Date: 2003-08-29 17:36:26

On Friday, Aug 29, 2003, at 15:14 America/Denver, E. Gladyshev wrote:
> ...
> People are adopted to follow similar
> requirements for STL allocators anyway.
> I guess they can be recommended to all boost
> authors who wants to make memory management
> data types.
> Perhaps they can be added to the "Guidlines" section

At the least, we could add the following bullet

   * Discussion of memory management strategy.


I'm reluctant to say very much more at this point, as my opinions
may not be suited to the needs of the many different libraries in
Boost. But I think it's generally reasonable to:
* not allocate memory unless it's really necessary
* use the standard mechanisms (::operator new or std::allocator)
   when it is necessary
* use custom allocation mechanisms only when there is a clear
   advantage to doing so
* parameterize only when there is a clear advantage to doing so
* use the standard parameterization mechanisms (Allocator) when
   choosing to parameterize
* use custom parameterization mechanisms only when there is a
   clear advantage to doing so
* document whether and how a library allocates memory

Boost list run by bdawes at, gregod at, cpdaniel at, john at