AJA NTV2 SDK  17.1.1.1245
NTV2 SDK 17.1.1.1245
AJAMemory Class Reference

#include <memory.h>

Public Member Functions

 AJAMemory ()
 
virtual ~AJAMemory ()
 

Static Public Member Functions

static void * Allocate (size_t size)
 
static void Free (void *pMemory)
 
static void * AllocateAligned (size_t size, size_t alignment)
 
static void FreeAligned (void *pMemory)
 
static void * AllocateShared (size_t *size, const char *pShareName, bool global=true)
 
static void FreeShared (void *pMemory)
 

Detailed Description

Collection of system independent memory allocation functions.

Definition at line 17 of file memory.h.

Constructor & Destructor Documentation

◆ AJAMemory()

AJAMemory::AJAMemory ( )

Definition at line 60 of file memory.cpp.

◆ ~AJAMemory()

AJAMemory::~AJAMemory ( )
virtual

Definition at line 65 of file memory.cpp.

Member Function Documentation

◆ Allocate()

void * AJAMemory::Allocate ( size_t  size)
static

Allocate memory with no specific alignment requirements.

Parameters
[in]sizeBytes of memory to allocate.
Returns
Address of allocated memory. NULL if allocation fails.

Definition at line 71 of file memory.cpp.

◆ AllocateAligned()

void * AJAMemory::AllocateAligned ( size_t  size,
size_t  alignment 
)
static

Allocate memory aligned to alignment bytes.

Parameters
[in]sizeBytes of memory to allocate.
[in]alignmentAlignment of allocated memory in bytes.
Returns
Address of allocated memory. NULL if allocation fails.

Definition at line 115 of file memory.cpp.

◆ AllocateShared()

void * AJAMemory::AllocateShared ( size_t *  size,
const char *  pShareName,
bool  global = true 
)
static

Allocate memory aligned to alignment bytes.

Allocates a named system wide memory region. If the named memory already exists that memory is returned and size is updated to reflect the preallocated size.

Parameters
[in,out]sizeBytes of memory to allocate.
[in]pShareNameName of system wide memory to allocate.
[in]globalIf true, shared memory region will be accessible across user accounts (Windows-only).
Returns
Address of allocated memory. NULL if allocation fails.

Definition at line 169 of file memory.cpp.

◆ Free()

void AJAMemory::Free ( void *  pMemory)
static

Free memory allocated using Allocate().

Parameters
[in]pMemoryAddress of memory to free.

Definition at line 97 of file memory.cpp.

◆ FreeAligned()

void AJAMemory::FreeAligned ( void *  pMemory)
static

Free memory allocated using AllocateAligned().

Parameters
[in]pMemoryAddress of memory to free.

Definition at line 145 of file memory.cpp.

◆ FreeShared()

void AJAMemory::FreeShared ( void *  pMemory)
static

Free memory allocated using AllocateShared().

Parameters
[in]pMemoryAddress of memory to free.

Definition at line 366 of file memory.cpp.


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