#include <MemUtils.h>
|
| | MemUtils ()=default |
| | The default class constructor.
|
| | ~MemUtils ()=default |
| | The class destructor.
|
|
| static void | clearMemory (void *buffer, size_t size) |
| | Will clear the given buffer with zero.
|
| static bool | isAligned (const void *ptr, size_t align) |
| | Will return true, if the pointer fits into the alignment.
|
| static const void * | alignPtr (void *ptr, size_t extra, size_t align) |
| | Will align the given pointer.
|
Definition at line 46 of file MemUtils.h.
◆ MemUtils()
| cppcore::MemUtils::MemUtils |
( |
| ) |
|
|
default |
The default class constructor.
◆ ~MemUtils()
| cppcore::MemUtils::~MemUtils |
( |
| ) |
|
|
default |
◆ alignPtr()
| const void * cppcore::MemUtils::alignPtr |
( |
void * | ptr, |
|
|
size_t | extra, |
|
|
size_t | align ) |
|
inlinestatic |
Will align the given pointer.
- Parameters
-
| [in] | ptr | The pointer to align. |
| [in] | extra | Space for headers / meta information. |
| [in] | align | The alignment to check for. |
- Returns
- The aligned pointer.
Definition at line 82 of file MemUtils.h.
References cppcore::align(), and ALIGN_MASK.
◆ clearMemory()
| void cppcore::MemUtils::clearMemory |
( |
void * | buffer, |
|
|
size_t | size ) |
|
static |
Will clear the given buffer with zero.
- Parameters
-
| [in,out] | buffer | The buffer to clear. |
Definition at line 27 of file MemUtils.cpp.
◆ isAligned()
| bool cppcore::MemUtils::isAligned |
( |
const void * | ptr, |
|
|
size_t | align ) |
|
inlinestatic |
Will return true, if the pointer fits into the alignment.
- Parameters
-
| [in] | ptr | The pointer to check. |
| [in] | align | The alignment to check for. |
- Returns
- true if aligned, false if not.
Definition at line 72 of file MemUtils.h.
References cppcore::align().
The documentation for this class was generated from the following files: