PhoenixHardware  0.2.0
Tools to get hardware information
Loading...
Searching...
No Matches
phoenix_allocAlignedVector.h File Reference
#include <stdlib.h>
+ Include dependency graph for phoenix_allocAlignedVector.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void * phoenix_allocAlignedTab (size_t sizeOfVectorInBytes, size_t alignementInBytes)
 Alloc an aligned vector.
 
void phoenix_freeAlignedVector (void *ptr)
 Free the aligned vector.
 

Function Documentation

◆ phoenix_allocAlignedTab()

void * phoenix_allocAlignedTab ( size_t sizeOfVectorInBytes,
size_t alignementInBytes )

Alloc an aligned vector.

Parameters
sizeOfVectorInBytes: size of the vector xe want to allocate
alignementInBytes: alignement of the vector we want to allocate
Returns
aligned pointor of the vector

Definition at line 35 of file phoenix_allocAlignedVector.cpp.

35 {
36 return memalign(alignementInBytes, sizeOfVectorInBytes);
37}

Referenced by phoenix_newAlignedTab(), and phoenix_template_alloc().

+ Here is the caller graph for this function:

◆ phoenix_freeAlignedVector()

void phoenix_freeAlignedVector ( void * ptr)

Free the aligned vector.

Parameters
ptr: pointor we want to free

Usage : void* mem = phoenix_allocAlignedVector(alignedVector, sizeOfVectorInBytes, alignementInBytes); ... Using of alignedVector pointor ... phoenix_freeAlignedVector(mem);

Definition at line 49 of file phoenix_allocAlignedVector.cpp.

49 {
50 if(ptr == NULL) return;
51 free(ptr);
52}

Referenced by PAlignedAllocator< T >::deallocate().

+ Here is the caller graph for this function: