Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device. Atlassian cookies and tracking notice, (opens new window)

Enlighten API 3.10 Documentation
Results will update as you type.
  • class Geo CovarianceMatrix
  • class Geo CovarianceMatrixBuilder
  • class Geo EmbreeRtMeshVisitor
  • class Geo Geo2DTransform
  • class Geo GeoAlignedFreeDestructor
  • class Geo GeoAllocationPage
  • class Geo GeoAllocator
  • class Geo GeoAllocatorUnchecked
  • class Geo GeoArray
  • class Geo GeoArray_Stl
  • class Geo GeoAutoArrayPtr
  • class Geo GeoAutoDeleteArray
  • class Geo GeoAutoDeleteList
  • class Geo GeoAutoDeleteMap
  • class Geo GeoAutoPtr
  • class Geo GeoAutoReleaseArray
  • class Geo GeoAutoReleaseMap
  • class Geo GeoAutoReleasePtr
  • class Geo GeoBitArray
  • class Geo GeoBitStore
  • class Geo GeoBlueNoise
  • class Geo GeoBlueNoiseDiskPalette
  • class Geo GeoBlueNoiseRayPalette
  • class Geo GeoBoundingBox
  • class Geo GeoBoundingSphere
  • class Geo GeoBufferedFileStream
  • class Geo GeoBufferedInputStream
  • class Geo GeoCriticalSection
  • class Geo GeoDebugAllocator
  • class Geo GeoDelegateDestructor
  • class Geo GeoDeleteArrayDestructor
  • class Geo GeoDeleteDestructor
  • class Geo GeoDepthCubeMap
  • class Geo GeoEmbreeContext
  • class Geo GeoEqualCString
  • class Geo GeoEvent
  • class Geo GeoFileManager
  • class Geo GeoFileStream
  • class Geo GeoFixedBinarySearchMap
  • class Geo GeoFixedBinarySearchMapCompare
  • class Geo GeoFixedPoolAllocator
  • class Geo GeoFixedString
  • class Geo GeoFlattenAndPackResults
  • class Geo GeoFp16Texture
  • class Geo GeoFpControl
  • class Geo GeoFrameTime
  • class Geo GeoFreeDestructor
  • class Geo GeoGenericTexture
  • class Geo GeoGuid
  • class Geo GeoHalf
  • class Geo GeoHashConstHandle
  • class Geo GeoHashCString
  • class Geo GeoHashDefault
  • class Geo GeoHashHandle
  • class Geo GeoHashMap
  • class Geo GeoHashString
  • class Geo GeoImmutableArray
  • class Geo GeoInputEvent
  • class Geo GeoInstanceCount
  • class Geo GeoIntRange
  • class Geo GeoIntrusivePtr
  • class Geo GeoKeyValueArray
  • class Geo GeoLineSegment
  • class Geo GeoList
  • class Geo GeoMap
  • class Geo GeoMemoryDefault
  • class Geo GeoMemoryPool
  • class Geo GeoMemoryStream
  • class Geo GeoNonAABoundingBox
  • class Geo GeoNoopDestructor
  • class Geo GeoPair
  • class Geo GeoParametrisedPlane3
  • class Geo GeoPriorityQueue
  • class Geo GeoProgress
  • class Geo GeoQueue
  • class Geo GeoQueueEnumInterface
  • class Geo GeoRefArrayPtr
  • class Geo GeoRefCount
  • class Geo GeoRefPtr
  • class Geo GeoRefReleasePtr
  • class Geo GeoReleaseDestructor
    Calendars

You‘re viewing this with anonymous access, so some content might be blocked.
/
class Geo GeoFixedPoolAllocator

    This is the documentation for Enlighten.

    class Geo GeoFixedPoolAllocator

    Nov 21, 2019

    template<typename TStorage>
    class Geo::GeoFixedPoolAllocator

    A std::allocator that passes memory requests through to a single underlying GeoAllocationPage.

    If you know how many nodes your list/map will use, you can create one of these to improve memory use.

    Please note that there are specialized versions of GeoList (GeoFixedPoolList) and GeoMap (GeoFixedPoolMap) that use GeoFixedPoolAllocator per default.

    // Setup typedef for the list type.
    typedef GeoFixedPoolList<int>::Type TPoolList;
    
    // Allocate memory for the fixed pool list.
    // Make sure to use max_allocation_size since the internal data structure is larger than the payload data.
    // The +1 is needed for the head of the list, where the same is required for the root of a map.
    GeoAllocationPage pool;
    pool.Create(TPoolList::max_allocation_size, 1000 + 1);
    
    // Setup allocator using the already allocated memory.
    GeoFixedPoolAllocator<TPoolList::value_type> allocator(&pool);
    
    {
        TPoolList list(allocator);
        for(s32 i = 0; i < 1000; ++i)
        {
            list.insert(list.end(), 2);
        }
    
        GEO_ASSERT(pool.m_InsertionPoint == pool.kSentinel);    // pool is full
    
    }   // allow list to fall out of scope
    
    GEO_ASSERT(pool.m_InsertionPoint != pool.kSentinel);        // pool is empty (or at least, not full)
    

    Typedefs

    Name Description
    const TStorage * const_pointer

    All functions and typedefs match those required by the C++0x standard.

    const TStorage & const_reference

    All functions and typedefs match those required by the C++0x standard.

    ptrdiff_t difference_type

    All functions and typedefs match those required by the C++0x standard.

    TStorage * pointer

    All functions and typedefs match those required by the C++0x standard.

    TStorage & reference

    All functions and typedefs match those required by the C++0x standard.

    GeoAllocationPage::TIndexer size_type

    All functions and typedefs match those required by the C++0x standard.

    TStorage value_type

    All functions and typedefs match those required by the C++0x standard.

    Friends

    Name Description
    friend class GeoFixedPoolAllocator

    All functions and typedefs match those required by the C++0x standard.

    Functions

    Name Description
    address(reference)

    All functions and typedefs match those required by the C++0x standard.

    address(const_reference)

    All functions and typedefs match those required by the C++0x standard.

    allocate(size_type, GeoFixedPoolAllocator< void >::const_pointer)

    All functions and typedefs match those required by the C++0x standard.

    construct(pointer, const_reference)

    All functions and typedefs match those required by the C++0x standard.

    deallocate(pointer, size_type)

    All functions and typedefs match those required by the C++0x standard.

    destroy(pointer)

    All functions and typedefs match those required by the C++0x standard.

    GeoFixedPoolAllocator(GeoAllocationPage *)

    All functions and typedefs match those required by the C++0x standard.

    GeoFixedPoolAllocator(const GeoFixedPoolAllocator< TOther > &)

    All functions and typedefs match those required by the C++0x standard.

    max_size()

    All functions and typedefs match those required by the C++0x standard.


    pointer Geo::GeoFixedPoolAllocator< TStorage >::address


    public: pointer address
    (
        reference x
    ) const


    All functions and typedefs match those required by the C++0x standard.


    const_pointer Geo::GeoFixedPoolAllocator< TStorage >::address


    public: const_pointer address
    (
        const_reference x
    ) const


    All functions and typedefs match those required by the C++0x standard.


    pointer Geo::GeoFixedPoolAllocator< TStorage >::allocate


    public: pointer allocate
    (
        size_type n,
        GeoFixedPoolAllocator< void >::const_pointer hint
    )


    All functions and typedefs match those required by the C++0x standard.


    void Geo::GeoFixedPoolAllocator< TStorage >::construct


    public: void construct
    (
        pointer p,
        const_reference val
    )


    All functions and typedefs match those required by the C++0x standard.


    void Geo::GeoFixedPoolAllocator< TStorage >::deallocate


    public: void deallocate
    (
        pointer p,
        size_type n
    )


    All functions and typedefs match those required by the C++0x standard.


    void Geo::GeoFixedPoolAllocator< TStorage >::destroy


    public: void destroy
    (
        pointer p
    )


    All functions and typedefs match those required by the C++0x standard.


    Geo::GeoFixedPoolAllocator< TStorage >::GeoFixedPoolAllocator


    public: GeoFixedPoolAllocator
    (
        GeoAllocationPage * pPool
    )


    All functions and typedefs match those required by the C++0x standard.


    Geo::GeoFixedPoolAllocator< TStorage >::GeoFixedPoolAllocator


    public: GeoFixedPoolAllocator
    (
        const GeoFixedPoolAllocator< TOther > & rhs
    )


    All functions and typedefs match those required by the C++0x standard.


    size_type Geo::GeoFixedPoolAllocator< TStorage >::max_size


    public: size_type max_size() const


    All functions and typedefs match those required by the C++0x standard.

    , multiple selections available,
    {"serverDuration": 16, "requestCorrelationId": "fec776aee327440aa4c6b044c7ceaaaa"}