|
libmemalloc
v3.5.00
Modern Memory Allocator
|
Go to the source code of this file.
Macros | |
| #define | __LIBMEMALLOC_HAS_ATTRIBUTE(attr_) 0 |
| Wrapper for __has_attribute when available. | |
| #define | __LIBMEMALLOC_GNUC_PREREQ(maj_, min_) 0 |
| GCC version check helper (non-Clang). | |
| #define | __LIBMEMALLOC_ATTR_ZERO_CALL_USED_REGS |
| Optional zero_call_used_regs("all") attribute wrapper. | |
| #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 | __LIBMEMALLOC_ATTR_SSO |
| #define | __LIBMEMALLOC_ATTR_ALIGNED |
| #define | __ALIGN __LIBMEMALLOC_ATTR_SSO __LIBMEMALLOC_ATTR_ALIGNED |
| 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_) (!!(cond_)) |
| 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.