GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  GU_RESERVEDALLOCATOR (3)

NAME

gu::ReservedAllocator< T, reserved, diagnostic > -

CONTENTS

Synopsis

SYNOPSIS

#include <gu_reserved_container.hpp>

    Data Structures

    struct rebind

    Public Types

    typedef chromium::AlignedBuffer< T, reserved > Buffer    
typedef T * pointer    
typedef const T * const_pointer    
typedef T & reference    
typedef const T & const_reference    
typedef T value_type    
typedef size_t size_type    
typedef ptrdiff_t difference_type

    Public Member Functions

    T * address (T &t) const    
const T * address (const T &t) const    
size_type max_size () const    
void construct (T *const p, const T &t) const    
void destroy (T *const p) const    
bool operator== (const ReservedAllocator &other) const    
bool operator!= (const ReservedAllocator &other) const    
ReservedAllocator (Buffer &buf, size_type n=0)    
ReservedAllocator (const ReservedAllocator &other)    
template<typename U , size_type c, bool d> ReservedAllocator (const ReservedAllocator< U, c, d > &)    
T * allocate (size_type const n, void *hint=NULL)    
void deallocate (T *const p, size_type const n)    
size_type used () const

Detailed Description

    template<typename T, int reserved, bool diagnostic = false>class gu::ReservedAllocator< T, reserved, diagnostic >

ReservedAllocator is an allocator for STL containers that can use a prealocated buffer (supplied at construction time) for initial container storage allocation. If the number of elements exceeds buffer capacity, it overflows to heap.

Unlike the Chromium code, this does not derive from std::allocator, but implements the whole thing.

NOTE1: container must support reserve() method.

NOTE2: it won’t work with containers that require allocator to have default constructor, like std::basic_string

Author

Generated automatically by Doxygen for GCS from the source code.

Search for    or go to Top of page |  Section 3 |  Main Index


Version 0.2.3 GU::RESERVEDALLOCATOR< T, RESERVED, DIAGNOSTIC > (3) Sun Apr 3 2016

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.