|
libmemalloc
v3.0.00
Modern Memory Allocator
|
Go to the source code of this file.
Macros | |
| #define | ALIGN(val_) (((val_) + (ARCH_ALIGNMENT - 1U)) & ~(ARCH_ALIGNMENT - 1U)) |
| Aligns a given value to the nearest memory boundary. | |
| #define | PTR_ERR(ptr_) ((void *)((intptr_t)(ptr_))) |
| Encodes a negative error code as an error pointer. | |
| #define | __LIBMEMALLOC_API |
| Defines the default visibility attribute for exported symbols. | |
| #define | __ALIGN |
| Defines structure alignment and enforces the target byte order. | |
| #define | __UNUSED |
| Marks a symbol as potentially unused. | |
| #define | __GC_HOT |
| Marks garbage-collector functions as “hot” (performance critical). | |
| #define | __GC_COLD |
| Marks garbage-collector functions as “cold” (infrequently used). | |
| #define | __LIBMEMALLOC_INTERNAL_MALLOC |
| Annotates allocator functions that return newly allocated memory. | |
| #define | __LIBMEMALLOC_MALLOC |
| Annotates allocator functions that return newly allocated memory. | |
| #define | __LIBMEMALLOC_REALLOC |
| Annotates reallocator functions that may return a pointer to resized memory. | |
| #define | __LIBMEMALLOC_INTERNAL_REALLOC |
| Annotates reallocator functions that may return a pointer to resized memory. | |
| #define | LIKELY(cond_) (!!(cond_)) |
| Compiler hint for likely branch prediction. | |
| #define | UNLIKELY(cond_) (!!(x)) |
| Compiler hint for unlikely branch prediction. | |
| #define | PREFETCH_R(addr_) ((void)0) |
| Read prefetch hint. | |
| #define | PREFETCH_W(addr_) ((void)0) |
| Write prefetch hint. | |
| #define | ASSUME_ALIGNED(ptr_, align_) (align_) |
| Tell the compiler the pointer has a fixed alignment. | |
Provides architecture-aware alignment definitions, symbol visibility attributes, and compiler optimization hints used throughout libmemalloc. Ensures consistent alignment, attribute semantics, and performance annotations across multiple target architectures and toolchains.