Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
std::pmr::u...ol_resource(3)  C++ Standard Libary std::pmr::u...ol_resource(3)

NAME
       std::pmr::unsynchronized_pool_resource	   -	  std::pmr::unsynchro-
       nized_pool_resource

Synopsis
	  Defined in header <memory_resource>
	  class		unsynchronized_pool_resource	     :		public
       (since C++17)
	  std::pmr::memory_resource;

	  The  class  std::pmr::unsynchronized_pool_resource is	a general-pur-
       pose memory
	  resource class with the following properties:

	    * It owns the allocated memory and frees it	on  destruction,  even
       if deallocate has
	      not been called for some of the allocated	blocks.
	    *  It  consists  of	a collection of	pools that serves requests for
       different block
	      sizes. Each pool manages a collection of chunks  that  are  then
       divided into
	      blocks of	uniform	size.
	    *  Calls  to  do_allocate  are  dispatched to the pool serving the
       smallest	blocks
	      accommodating the	requested size.
	    * Exhausting memory	in the pool causes the next allocation request
       for that	pool
	      to allocate an additional	chunk of memory	from the upstream  al-
       locator to
	      replenish	 the pool. The chunk size obtained increases geometri-
       cally.
	    * Allocations requests that	exceed	the  largest  block  size  are
       served from the
	      upstream allocator directly.
	    *  The  largest  block size	and maximum chunk size may be tuned by
       passing a
	      std::pmr::pool_options struct to its constructor.

	  unsynchronized_pool_resource is not thread-safe, and cannot  be  ac-
       cessed from
	  multiple  threads  simultaneously; use synchronized_pool_resource if
       access from
	  multiple threads is required.

Member functions
	  constructor	    Constructs a unsynchronized_pool_resource
			    (public member function)
	  destructor	    Destroys a unsynchronized_pool_resource, releasing
       all allocated
	  [virtual]	    memory
			    (virtual public member function)
	  operator=	    Copy assignment operator  is  deleted.  unsynchro-
       nized_pool_resource
	  [deleted]	    is not copy	assignable
			    (public member function)

Public member functions
	  release	    Release all	allocated memory
			    (public member function)
	  upstream_resource Returns a pointer to the upstream memory resource
			    (public member function)
			    Returns  the  options that control the pooling be-
       havior of this
	  options	    resource
			    (public member function)

Protected member functions
	  do_allocate	    Allocate memory
	  [virtual]	    (virtual protected member function)
	  do_deallocate	    Return memory to the pool
	  [virtual]	    (virtual protected member function)
	  do_is_equal	    Compare for	equality with  another	std::pmr::mem-
       ory_resource
	  [virtual]	    (virtual protected member function)

http://cppreference.com		  2022.07.31	  std::pmr::u...ol_resource(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=std::pmr::unsynchronized_pool_resource&sektion=3&manpath=FreeBSD+Ports+15.0>

home | help