|
HDK
|
Files | |
| file | align.h |
Macros | |
| #define | ARCH_MAX_ALIGNMENT_INCREASE |
| #define | ARCH_CACHE_LINE_SIZE |
Functions | |
| size_t | ArchAlignMemorySize (size_t nBytes) |
| void * | ArchAlignMemory (void *base) |
| ARCH_API void * | ArchAlignedAlloc (size_t alignment, size_t size) |
| Aligned memory allocation. More... | |
| ARCH_API void | ArchAlignedFree (void *ptr) |
| Free memory allocated by ArchAlignedAlloc. More... | |
| #define ARCH_CACHE_LINE_SIZE |
| #define ARCH_MAX_ALIGNMENT_INCREASE |
Maximum extra space needed for alignment.
The ArchAlignMemorySize() can increase the required memory by no more than ARCH_MAX_ALIGNMENT_INCREASE.
|
inline |
Return suitably aligned memory size.
Requests to malloc() or ::new for a given size are often rounded upward. Given a request for nBytes bytes of storage, this function returns the amount that would actually be consumed by the system to satisfy it. This is needed for efficient user-defined memory management.