memory_resource File Reference
Utilities » Memory » Polymorphic memory resources

Go to the source code of this file.

## Classes

class | std::pmr::monotonic_buffer_resource
struct | std::pmr::pool_options
class | std::pmr::unsynchronized_pool_resource

## Namespaces

namespace | std

## Macros

#define | __glibcxx_want_memory_resource
#define | __glibcxx_want_polymorphic_allocator
#define | _GLIBCXX_MEMORY_RESOURCE

## Functions

memory_resource * | std::pmr::get_default_resource () noexcept
memory_resource * | std::pmr::new_delete_resource () noexcept
memory_resource * | std::pmr::null_memory_resource () noexcept
memory_resource * | std::pmr::set_default_resource (memory_resource *__r) noexcept

## Detailed Description

This is a Standard C++ Library header.

This header declares the pmr (std::pmr) memory resources.

Definition in file memory_resource.

## Macro Definition Documentation

## __glibcxx_want_memory_resource

#define __glibcxx_want_memory_resource

Definition at line 42 of file memory_resource.

## __glibcxx_want_polymorphic_allocator

#define __glibcxx_want_polymorphic_allocator

Definition at line 41 of file memory_resource.

## _GLIBCXX_MEMORY_RESOURCE

#define _GLIBCXX_MEMORY_RESOURCE

Definition at line 33 of file memory_resource.

## Function Documentation

## get_default_resource()

memory_resource * std::pmr::get_default_resource | ( |  | ) |

noexcept

Get the current default memory resource pointer.

## null_memory_resource()

memory_resource * std::pmr::null_memory_resource | ( |  | ) |

nodiscard noexcept

A pmr::memory_resource that always throws bad_alloc.

## set_default_resource()

memory_resource * std::pmr::set_default_resource | ( | memory_resource * | __r | ) |

noexcept

Replace the default memory resource pointer.