Implementation classes. Use the aliases in cptr, such as cptr::list.
| Name | Description |
|---|---|
basic_forward_list | The class behind cptr::forward_list; use that alias. Its members behave like those of std::forward_list; the alias lists the differences. |
basic_list | The class behind cptr::list; use that alias. Its members behave like those of std::list; the alias lists the differences. |
basic_ordered_map | The class behind cptr::ordered_map; use that alias. Its members behave like those of std::map; the alias lists the differences. |
basic_unordered_map | The class behind cptr::unordered_map; use that alias. Its members behave like those of std::unordered_map; the alias lists the differences. |
fork_safe_lock | A spin lock that is held across fork(), like cage's own lock, so that a child never starts with it taken by a thread that does not exist there. Every live fork_safe_lock is in one list, which a single pthread_atfork handler locks in order before fork() and unlocks after it. |
null_literal_tag |
| Name | Description |
|---|---|
null_literal | The parameter type that accepts a literal 0 or NULL and nothing else of integer type: only a null pointer constant converts to a pointer to member, and no one can name a member of an incomplete struct. |
| Name | Description |
|---|---|
base_address | A cage's base address. An enum rather than a std::uintptr_t, so that type-based alias analysis knows stores through a std::uintptr_t* or std::size_t* cannot change it, and compilers keep it in a register across such stores, as in a loop that follows pointers and counts. |
| Name | Description |
|---|---|
compress_constant | |
decompress_as | Cage::decompress, but constant-evaluable for null: the check runs only in constant evaluation, so the run-time code is the cage's. |
decompress_constant | |
nonnull_pointer_in_constant_expression | |
release | Give back address space from reserve_aligned(), whole. |
size_class | The smallest class of at least bytes (1 to kMaxSmall) whose size is a multiple of align (a power of two up to kMaxSmall). Above 256 bytes there are four classes per power of two p, p + p/4 ... 2p, so the class follows from the top three bits of bytes - 1, and as they are multiples of p/4 >= 64, only alignments above 64 need a short search from there. |
swap | |
operator== | Equal if both hold the same keys with equal values. |
operator<=> | Three-way comparison operators |