Dynamic memory allocation routines and custom allocators specifically crafted to support memory instrumentation through performance schema memory engine (PFS).
More...
|
PSI_memory_key_t | ut::make_psi_memory_key (PSI_memory_key key) |
| Convenience helper function to create type-safe representation of PSI_memory_key. More...
|
|
void | ut_new_boot () |
| Setup the internal objects needed for ut::*_withkey() to operate. More...
|
|
void | ut_new_boot_safe () |
| Setup the internal objects needed for ut::*_withkey() to operate. More...
|
|
constexpr bool | ut_string_begins_with (const char *a, const char *b, size_t b_len) |
| gcc 5 fails to evaluate costexprs at compile time. More...
|
|
constexpr size_t | ut_len_without_extension (const char *file) |
| Find the length of the filename without its file extension. More...
|
|
constexpr int | ut_new_get_key_by_base_file (const char *file, size_t len) |
| Retrieve a memory key (registered with PFS), given the file name of the caller. More...
|
|
constexpr int | ut_new_get_key_by_file (const char *file) |
| Retrieve a memory key (registered with PFS), given the file name of the caller. More...
|
|
void * | ut::malloc_withkey (PSI_memory_key_t key, std::size_t size) noexcept |
| Dynamically allocates storage of given size. More...
|
|
void * | ut::malloc (std::size_t size) noexcept |
| Dynamically allocates storage of given size. More...
|
|
void * | ut::zalloc_withkey (PSI_memory_key_t key, std::size_t size) noexcept |
| Dynamically allocates zero-initialized storage of given size. More...
|
|
void * | ut::zalloc (std::size_t size) noexcept |
| Dynamically allocates zero-initialized storage of given size. More...
|
|
void * | ut::realloc_withkey (PSI_memory_key_t key, void *ptr, std::size_t size) noexcept |
| Upsizes or downsizes already dynamically allocated storage to the new size. More...
|
|
void * | ut::realloc (void *ptr, std::size_t size) noexcept |
| Upsizes or downsizes already dynamically allocated storage to the new size. More...
|
|
void | ut::free (void *ptr) noexcept |
| Releases storage which has been dynamically allocated through any of the ut::malloc*(), ut::realloc* or ut::zalloc*() variants. More...
|
|
template<typename T , typename... Args> |
T * | ut::new_withkey (PSI_memory_key_t key, Args &&...args) |
| Dynamically allocates storage for an object of type T. More...
|
|
template<typename T , typename... Args> |
T * | ut::new_ (Args &&...args) |
| Dynamically allocates storage for an object of type T. More...
|
|
template<typename T > |
void | ut::delete_ (T *ptr) noexcept |
| Releases storage which has been dynamically allocated through any of the ut::new*() variants. More...
|
|
template<typename T , typename... Args> |
T * | ut::new_arr_withkey (PSI_memory_key_t key, Args &&...args) |
| Dynamically allocates storage for an array of T's. More...
|
|
template<typename T , typename... Args> |
T * | ut::new_arr (Args &&...args) |
| Dynamically allocates storage for an array of T's. More...
|
|
template<typename T > |
T * | ut::new_arr_withkey (PSI_memory_key_t key, Count count) |
| Dynamically allocates storage for an array of T's. More...
|
|
template<typename T > |
T * | ut::new_arr (Count count) |
| Dynamically allocates storage for an array of T's. More...
|
|
template<typename T > |
void | ut::delete_arr (T *ptr) noexcept |
| Releases storage which has been dynamically allocated through any of the ut::new_arr*() variants. More...
|
|
size_t | ut::pfs_overhead () noexcept |
| Returns number of bytes that ut::malloc_*, ut::zalloc_*, ut::realloc_* and ut::new_* variants will be using to store the necessary metadata for PFS. More...
|
|
void * | ut::malloc_page_withkey (PSI_memory_key_t key, std::size_t size) noexcept |
| Dynamically allocates system page-aligned storage of given size. More...
|
|
void * | ut::malloc_page (std::size_t size) noexcept |
| Dynamically allocates system page-aligned storage of given size. More...
|
|
size_t | ut::page_allocation_size (void *ptr) noexcept |
| Retrieves the total amount of bytes that are available for application code to use. More...
|
|
allocation_low_level_info | ut::page_low_level_info (void *ptr) noexcept |
| Retrieves the pointer and size of the allocation provided by the OS. More...
|
|
bool | ut::free_page (void *ptr) noexcept |
| Releases storage which has been dynamically allocated through any of the ut::malloc_page*() variants. More...
|
|
void * | ut::malloc_large_page_withkey (PSI_memory_key_t key, std::size_t size) noexcept |
| Dynamically allocates memory backed up by large (huge) pages. More...
|
|
void * | ut::malloc_large_page (std::size_t size) noexcept |
| Dynamically allocates memory backed up by large (huge) pages. More...
|
|
size_t | ut::large_page_allocation_size (void *ptr) noexcept |
| Retrieves the total amount of bytes that are available for application code to use. More...
|
|
allocation_low_level_info | ut::large_page_low_level_info (void *ptr) noexcept |
| Retrieves the pointer and size of the allocation provided by the OS. More...
|
|
bool | ut::free_large_page (void *ptr) noexcept |
| Releases storage which has been dynamically allocated through any of the ut::malloc_large_page*() variants. More...
|
|
void * | ut::malloc_large_page_withkey (PSI_memory_key_t key, std::size_t size, fallback_to_normal_page_t, bool large_pages_enabled=os_use_large_pages) noexcept |
| Dynamically allocates memory backed up by large (huge) pages. More...
|
|
void * | ut::malloc_large_page (std::size_t size, fallback_to_normal_page_t, bool large_pages_enabled=os_use_large_pages) noexcept |
| Dynamically allocates memory backed up by large (huge) pages. More...
|
|
size_t | ut::large_page_allocation_size (void *ptr, fallback_to_normal_page_t) noexcept |
| Retrieves the total amount of bytes that are available for application code to use. More...
|
|
allocation_low_level_info | ut::large_page_low_level_info (void *ptr, fallback_to_normal_page_t) noexcept |
| Retrieves the pointer and size of the allocation provided by the OS. More...
|
|
bool | ut::free_large_page (void *ptr, fallback_to_normal_page_t) noexcept |
| Releases storage which has been dynamically allocated through any of the ut::malloc_large_page*(fallback_to_normal_page_t) variants. More...
|
|
void * | ut::aligned_alloc_withkey (PSI_memory_key_t key, std::size_t size, std::size_t alignment) noexcept |
| Dynamically allocates storage of given size and at the address aligned to the requested alignment. More...
|
|
void * | ut::aligned_alloc (std::size_t size, std::size_t alignment) noexcept |
| Dynamically allocates storage of given size and at the address aligned to the requested alignment. More...
|
|
void * | ut::aligned_zalloc_withkey (PSI_memory_key_t key, std::size_t size, std::size_t alignment) noexcept |
| Dynamically allocates zero-initialized storage of given size and at the address aligned to the requested alignment. More...
|
|
void * | ut::aligned_zalloc (std::size_t size, std::size_t alignment) noexcept |
| Dynamically allocates zero-initialized storage of given size and at the address aligned to the requested alignment. More...
|
|
void | ut::aligned_free (void *ptr) noexcept |
| Releases storage which has been dynamically allocated through any of the aligned_alloc_*() or aligned_zalloc_*() variants. More...
|
|
template<typename T , typename... Args> |
T * | ut::aligned_new_withkey (PSI_memory_key_t key, std::size_t alignment, Args &&...args) |
| Dynamically allocates storage for an object of type T at address aligned to the requested alignment. More...
|
|
template<typename T , typename... Args> |
T * | ut::aligned_new (std::size_t alignment, Args &&...args) |
| Dynamically allocates storage for an object of type T at address aligned to the requested alignment. More...
|
|
template<typename T > |
void | ut::aligned_delete (T *ptr) noexcept |
| Releases storage which has been dynamically allocated through any of the aligned_new_*() variants. More...
|
|
template<typename T , typename... Args> |
T * | ut::aligned_new_arr_withkey (PSI_memory_key_t key, std::size_t alignment, Args &&...args) |
| Dynamically allocates storage for an array of T's at address aligned to the requested alignment. More...
|
|
template<typename T > |
T * | ut::aligned_new_arr_withkey (PSI_memory_key_t key, std::size_t alignment, Count count) |
| Dynamically allocates storage for an array of T's at address aligned to the requested alignment. More...
|
|
template<typename T , typename... Args> |
T * | ut::aligned_new_arr (std::size_t alignment, Args &&...args) |
| Dynamically allocates storage for an array of T's at address aligned to the requested alignment. More...
|
|
template<typename T > |
T * | ut::aligned_new_arr (std::size_t alignment, Count count) |
| Dynamically allocates storage for an array of T's at address aligned to the requested alignment. More...
|
|
template<typename T > |
void | ut::aligned_delete_arr (T *ptr) noexcept |
| Releases storage which has been dynamically allocated through any of the aligned_new_arr_*() variants. More...
|
|
template<typename T , typename Deleter = detail::Deleter<T>, typename... Args> |
std::enable_if_t<!std::is_array< T >::value, std::unique_ptr< T, Deleter > > | ut::make_unique (Args &&...args) |
| Dynamically allocates storage for an object of type T. More...
|
|
template<typename T , typename Deleter = detail::Deleter<T>, typename... Args> |
std::enable_if_t<!std::is_array< T >::value, std::unique_ptr< T, Deleter > > | ut::make_unique (PSI_memory_key_t key, Args &&...args) |
| Dynamically allocates storage for an object of type T. More...
|
|
template<typename T , typename Deleter = detail::Array_deleter<std::remove_extent_t<T>>> |
std::enable_if_t< detail::is_unbounded_array_v< T >, std::unique_ptr< T, Deleter > > | ut::make_unique (size_t size) |
| Dynamically allocates storage for an object of type T. More...
|
|
template<typename T , typename Deleter = detail::Array_deleter<std::remove_extent_t<T>>> |
std::enable_if_t< detail::is_unbounded_array_v< T >, std::unique_ptr< T, Deleter > > | ut::make_unique (PSI_memory_key_t key, size_t size) |
| Dynamically allocates storage for an object of type T. More...
|
|
template<typename T , typename... Args> |
std::enable_if_t< detail::is_bounded_array_v< T > > | ut::make_unique (Args &&...)=delete |
| std::unique_ptr for arrays of known compile-time bound are disallowed. More...
|
|
template<typename T , typename... Args> |
std::enable_if_t< detail::is_bounded_array_v< T > > | ut::make_unique (PSI_memory_key_t key, Args &&...)=delete |
| std::unique_ptr in PFS-enabled builds for arrays of known compile-time bound are disallowed. More...
|
|
template<typename T , typename Deleter = detail::Aligned_deleter<T>, typename... Args> |
std::enable_if_t<!std::is_array< T >::value, std::unique_ptr< T, Deleter > > | ut::make_unique_aligned (size_t alignment, Args &&...args) |
| Dynamically allocates storage for an object of type T at address aligned to the requested alignment. More...
|
|
template<typename T , typename Deleter = detail::Aligned_deleter<T>, typename... Args> |
std::enable_if_t<!std::is_array< T >::value, std::unique_ptr< T, Deleter > > | ut::make_unique_aligned (PSI_memory_key_t key, size_t alignment, Args &&...args) |
| Dynamically allocates storage for an array of objects of type T at address aligned to the requested alignment. More...
|
|
template<typename T , typename Deleter = detail::Aligned_array_deleter< std::remove_extent_t<T>>> |
std::enable_if_t< detail::is_unbounded_array_v< T >, std::unique_ptr< T, Deleter > > | ut::make_unique_aligned (size_t alignment, size_t size) |
| Dynamically allocates storage for an array of requested size of objects of type T at address aligned to the requested alignment. More...
|
|
template<typename T , typename Deleter = detail::Aligned_array_deleter< std::remove_extent_t<T>>> |
std::enable_if_t< detail::is_unbounded_array_v< T >, std::unique_ptr< T, Deleter > > | ut::make_unique_aligned (PSI_memory_key_t key, size_t alignment, size_t size) |
| Dynamically allocates storage for an array of requested size of objects of type T at address aligned to the requested alignment. More...
|
|
template<typename T , typename... Args> |
std::enable_if_t< detail::is_bounded_array_v< T > > | ut::make_unique_aligned (Args &&...)=delete |
| std::unique_ptr for arrays of known compile-time bound are disallowed. More...
|
|
template<typename T , typename... Args> |
std::enable_if_t< detail::is_bounded_array_v< T > > | ut::make_unique_aligned (PSI_memory_key_t key, Args &&...)=delete |
| std::unique_ptr in PFS-enabled builds for arrays of known compile-time bound are disallowed. More...
|
|
template<typename T , typename Deleter = detail::Deleter<T>, typename... Args> |
std::enable_if_t<!std::is_array< T >::value, std::shared_ptr< T > > | ut::make_shared (Args &&...args) |
| Dynamically allocates storage for an object of type T. More...
|
|
template<typename T , typename Deleter = detail::Deleter<T>, typename... Args> |
std::enable_if_t<!std::is_array< T >::value, std::shared_ptr< T > > | ut::make_shared (PSI_memory_key_t key, Args &&...args) |
| Dynamically allocates storage for an object of type T. More...
|
|
template<typename T , typename Deleter = detail::Array_deleter<std::remove_extent_t<T>>> |
std::enable_if_t< detail::is_unbounded_array_v< T >, std::shared_ptr< T > > | ut::make_shared (size_t size) |
| Dynamically allocates storage for an array of requested size of objects of type T. More...
|
|
template<typename T , typename Deleter = detail::Array_deleter<std::remove_extent_t<T>>> |
std::enable_if_t< detail::is_unbounded_array_v< T >, std::shared_ptr< T > > | ut::make_shared (PSI_memory_key_t key, size_t size) |
| Dynamically allocates storage for an array of requested size of objects of type T. More...
|
|
template<typename T , typename Deleter = detail::Array_deleter<std::remove_extent_t<T>>> |
std::enable_if_t< detail::is_bounded_array_v< T >, std::shared_ptr< T > > | ut::make_shared () |
| Dynamically allocates storage for an array of objects of type T. More...
|
|
template<typename T , typename Deleter = detail::Array_deleter<std::remove_extent_t<T>>> |
std::enable_if_t< detail::is_bounded_array_v< T >, std::shared_ptr< T > > | ut::make_shared (PSI_memory_key_t key) |
| Dynamically allocates storage for an array of objects of type T. More...
|
|
template<typename T , typename Deleter = detail::Aligned_deleter<T>, typename... Args> |
std::enable_if_t<!std::is_array< T >::value, std::shared_ptr< T > > | ut::make_shared_aligned (size_t alignment, Args &&...args) |
| Dynamically allocates storage for an object of type T at address aligned to the requested alignment. More...
|
|
template<typename T , typename Deleter = detail::Aligned_deleter<T>, typename... Args> |
std::enable_if_t<!std::is_array< T >::value, std::shared_ptr< T > > | ut::make_shared_aligned (PSI_memory_key_t key, size_t alignment, Args &&...args) |
| Dynamically allocates storage for an object of type T at address aligned to the requested alignment. More...
|
|
template<typename T , typename Deleter = detail::Aligned_array_deleter< std::remove_extent_t<T>>> |
std::enable_if_t< detail::is_unbounded_array_v< T >, std::shared_ptr< T > > | ut::make_shared_aligned (size_t alignment, size_t size) |
| Dynamically allocates storage for an array of requested size of objects of type T at address aligned to the requested alignment. More...
|
|
template<typename T , typename Deleter = detail::Aligned_array_deleter< std::remove_extent_t<T>>> |
std::enable_if_t< detail::is_unbounded_array_v< T >, std::shared_ptr< T > > | ut::make_shared_aligned (PSI_memory_key_t key, size_t alignment, size_t size) |
| Dynamically allocates storage for an array of requested size of objects of type T at address aligned to the requested alignment. More...
|
|
template<typename T , typename Deleter = detail::Aligned_array_deleter< std::remove_extent_t<T>>> |
std::enable_if_t< detail::is_bounded_array_v< T >, std::shared_ptr< T > > | ut::make_shared_aligned (size_t alignment) |
| Dynamically allocates storage for an array of objects of type T at address aligned to the requested alignment. More...
|
|
template<typename T , typename Deleter = detail::Aligned_array_deleter< std::remove_extent_t<T>>> |
std::enable_if_t< detail::is_bounded_array_v< T >, std::shared_ptr< T > > | ut::make_shared_aligned (PSI_memory_key_t key, size_t alignment) |
| Dynamically allocates storage for an array of objects of type T at address aligned to the requested alignment. More...
|
|