All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
G3D::AlignedMemoryManager Class Reference

#include <MemoryManager.h>

Public Types

typedef shared_ptr< class
- Public Types inherited from G3D::MemoryManager
typedef shared_ptr< class

Public Member Functions

virtual void * alloc (size_t s)
virtual void free (void *ptr)
virtual bool isThreadsafe () const
- Public Member Functions inherited from G3D::ReferenceCountedObject
virtual ~ReferenceCountedObject ()

Static Public Member Functions

static AlignedMemoryManager::Ref create ()
- Static Public Member Functions inherited from G3D::MemoryManager
static MemoryManager::Ref create ()

Protected Member Functions

 AlignedMemoryManager ()
- Protected Member Functions inherited from G3D::MemoryManager
 MemoryManager ()

Detailed Description

Allocates memory on 16-byte boundaries.

See also
MemoryManager, CRTMemoryManager, AreaMemoryManager

Member Typedef Documentation

Constructor & Destructor Documentation

G3D::AlignedMemoryManager::AlignedMemoryManager ( )
43 {}

+ Here is the caller graph for this function:

Member Function Documentation

void * G3D::AlignedMemoryManager::alloc ( size_t  s)

Return a pointer to s bytes of memory that are unused by the rest of the program. The contents of the memory are undefined

Reimplemented from G3D::MemoryManager.

46  {
47  return System::alignedMalloc(s, 16);
48 }
static void * alignedMalloc(size_t bytes, size_t alignment)
Definition: System.cpp:1482

+ Here is the call graph for this function:

AlignedMemoryManager::Ref G3D::AlignedMemoryManager::create ( )
61  {
63  return m;
64 }
shared_ptr< class AlignedMemoryManager > Ref
Definition: MemoryManager.h:62
Definition: MemoryManager.cpp:43

+ Here is the call graph for this function:

void G3D::AlignedMemoryManager::free ( void *  ptr)

Invoke to declare that this memory will no longer be used by the program. The memory manager is not required to actually reuse or release this memory.

Reimplemented from G3D::MemoryManager.

51  {
53 }
static void alignedFree(void *ptr)
Definition: System.cpp:1546

+ Here is the call graph for this function:

bool G3D::AlignedMemoryManager::isThreadsafe ( ) const

Returns true if this memory manager is threadsafe (i.e., alloc and free can be called asychronously)

Reimplemented from G3D::MemoryManager.

56  {
57  return true;
58 }

The documentation for this class was generated from the following files: