From 88e602c57797660ebe0f9e15dbd64c1ff16dead3 Mon Sep 17 00:00:00 2001 From: DongHun Kwak Date: Wed, 13 Sep 2017 11:26:20 +0900 Subject: Imported Upstream version 1.65.1 Change-Id: Ie4005d637141f8311f4b6d46b613478a2b3dae59 Signed-off-by: DongHun Kwak --- .../container/pmr/synchronized_pool_resource.html | 96 +++++++++++----------- 1 file changed, 48 insertions(+), 48 deletions(-) (limited to 'doc/html/boost/container/pmr/synchronized_pool_resource.html') diff --git a/doc/html/boost/container/pmr/synchronized_pool_resource.html b/doc/html/boost/container/pmr/synchronized_pool_resource.html index 62898474f6..040bf9310c 100644 --- a/doc/html/boost/container/pmr/synchronized_pool_resource.html +++ b/doc/html/boost/container/pmr/synchronized_pool_resource.html @@ -8,7 +8,7 @@ - + @@ -21,7 +21,7 @@

-PrevUpHomeNext +PrevUpHomeNext
@@ -38,32 +38,32 @@ { public: // construct/copy/destruct - synchronized_pool_resource(const pool_options &, memory_resource *) noexcept; - synchronized_pool_resource() noexcept; - explicit synchronized_pool_resource(memory_resource *) noexcept; - explicit synchronized_pool_resource(const pool_options &) noexcept; - synchronized_pool_resource(const synchronized_pool_resource &) = delete; + synchronized_pool_resource(const pool_options &, memory_resource *) noexcept; + synchronized_pool_resource() noexcept; + explicit synchronized_pool_resource(memory_resource *) noexcept; + explicit synchronized_pool_resource(const pool_options &) noexcept; + synchronized_pool_resource(const synchronized_pool_resource &) = delete; synchronized_pool_resource - operator=(const synchronized_pool_resource &) = delete; - ~synchronized_pool_resource(); + operator=(const synchronized_pool_resource &) = delete; + ~synchronized_pool_resource(); - // public member functions - void release(); - memory_resource * upstream_resource() const; - pool_options options() const; - std::size_t pool_count() const; - std::size_t pool_index(std::size_t) const; - std::size_t pool_next_blocks_per_chunk(std::size_t) const; - std::size_t pool_block(std::size_t) const; - std::size_t pool_cached_blocks(std::size_t) const; + // public member functions + void release(); + memory_resource * upstream_resource() const; + pool_options options() const; + std::size_t pool_count() const; + std::size_t pool_index(std::size_t) const; + std::size_t pool_next_blocks_per_chunk(std::size_t) const; + std::size_t pool_block(std::size_t) const; + std::size_t pool_cached_blocks(std::size_t) const; - // protected member functions - virtual void * do_allocate(std::size_t, std::size_t); - virtual void do_deallocate(void *, std::size_t, std::size_t); - virtual bool do_is_equal(const memory_resource &) const noexcept; + // protected member functions + virtual void * do_allocate(std::size_t, std::size_t); + virtual void do_deallocate(void *, std::size_t, std::size_t); + virtual bool do_is_equal(const memory_resource &) const noexcept; };
-

Description

+

Description

A synchronized_pool_resource is a general-purpose memory resources having the following qualities:

  • Each resource owns the allocated memory, and frees it on destruction, even if deallocate has not been called for some of the allocated blocks.

  • @@ -76,79 +76,79 @@

    A synchronized_pool_resource may be accessed from multiple threads without external synchronization and may have thread-specific pools to reduce synchronization costs.

    -

    +

    synchronized_pool_resource public construct/copy/destruct

    1. -
      synchronized_pool_resource(const pool_options & opts, 
      +
      synchronized_pool_resource(const pool_options & opts, 
                                  memory_resource * upstream) noexcept;

      Requires: upstream is the address of a valid memory resource.

      Effects: Constructs a pool resource object that will obtain memory from upstream whenever the pool resource is unable to satisfy a memory request from its own internal data structures. The resulting object will hold a copy of upstream, but will not own the resource to which upstream points. [ Note: The intention is that calls to upstream->allocate() will be substantially fewer than calls to this->allocate() in most cases. - end note The behavior of the pooling mechanism is tuned according to the value of the opts argument.

      Throws: Nothing unless upstream->allocate() throws. It is unspecified if or under what conditions this constructor calls upstream->allocate().

    2. -
      synchronized_pool_resource() noexcept;
      -

      Effects: Same as unsynchronized_pool_resource(pool_options(), get_default_resource()).

      +
      synchronized_pool_resource() noexcept;
      +

      Effects: Same as unsynchronized_pool_resource(pool_options(), get_default_resource()).

    3. -
      explicit synchronized_pool_resource(memory_resource * upstream) noexcept;
      +
      explicit synchronized_pool_resource(memory_resource * upstream) noexcept;

      Effects: Same as unsynchronized_pool_resource(pool_options(), upstream).

    4. -
      explicit synchronized_pool_resource(const pool_options & opts) noexcept;
      +
      explicit synchronized_pool_resource(const pool_options & opts) noexcept;

      Effects: Same as unsynchronized_pool_resource(opts, get_default_resource()).

    5. -
    6. synchronized_pool_resource(const synchronized_pool_resource &) = delete;
    7. +
    8. synchronized_pool_resource(const synchronized_pool_resource &) = delete;
    9. synchronized_pool_resource 
      -operator=(const synchronized_pool_resource &) = delete;
    10. +operator=(const synchronized_pool_resource &) = delete;
    11. -
      ~synchronized_pool_resource();
      +
      ~synchronized_pool_resource();

      Effects: Calls this->release().

    -

    -synchronized_pool_resource public member functions

    +

    +synchronized_pool_resource public member functions

    1. -
      void release();
      +
      void release();

      Effects: Calls Calls upstream_resource()->deallocate() as necessary to release all allocated memory. [ Note: memory is released back to upstream_resource() even if deallocate has not been called for some of the allocated blocks. - end note ]

    2. -
      memory_resource * upstream_resource() const;
      +
      memory_resource * upstream_resource() const;

      Returns: The value of the upstream argument provided to the constructor of this object.

    3. -
      pool_options options() const;
      +
      pool_options options() const;

      Returns: The options that control the pooling behavior of this resource. The values in the returned struct may differ from those supplied to the pool resource constructor in that values of zero will be replaced with implementation-defined defaults and sizes may be rounded to unspecified granularity.

    4. -
      std::size_t pool_count() const;
      +
      std::size_t pool_count() const;

      Returns: The number of pools that will be used in the pool resource.

      Note: Non-standard extension.

    5. -
      std::size_t pool_index(std::size_t bytes) const;
      +
      std::size_t pool_index(std::size_t bytes) const;

      Returns: The index of the pool that will be used to serve the allocation of bytes. Returns pool_count() if bytes is bigger than options().largest_required_pool_block (no pool will be used to serve this).

      Note: Non-standard extension.

    6. -
      std::size_t pool_next_blocks_per_chunk(std::size_t pool_idx) const;
      +
      std::size_t pool_next_blocks_per_chunk(std::size_t pool_idx) const;

      Requires: pool_idx < pool_index()

      Returns: The number blocks that will be allocated in the next chunk from the pool specified by pool_idx.

      Note: Non-standard extension.

    7. -
      std::size_t pool_block(std::size_t pool_idx) const;
      +
      std::size_t pool_block(std::size_t pool_idx) const;

      Requires: pool_idx < pool_index()

      Returns: The number of bytes of the block that the specified pool_idx pool manages.

      Note: Non-standard extension.

    8. -
      std::size_t pool_cached_blocks(std::size_t pool_idx) const;
      +
      std::size_t pool_cached_blocks(std::size_t pool_idx) const;

      Requires: pool_idx < pool_index()

      Returns: The number of blocks that the specified pool_idx pool has cached and will be served without calling the upstream_allocator.

      Note: Non-standard extension.

      @@ -156,22 +156,22 @@
    -

    -synchronized_pool_resource protected member functions

    +

    +synchronized_pool_resource protected member functions

    1. -
      virtual void * do_allocate(std::size_t bytes, std::size_t alignment);
      +
      virtual void * do_allocate(std::size_t bytes, std::size_t alignment);

      Returns: A pointer to allocated storage with a size of at least bytes. The size and alignment of the allocated memory shall meet the requirements for a class derived from memory_resource.

      Effects: If the pool selected for a block of size bytes is unable to satisfy the memory request from its own internal data structures, it will call upstream_resource()->allocate() to obtain more memory. If bytes is larger than that which the largest pool can handle, then memory will be allocated using upstream_resource()->allocate().

      Throws: Nothing unless upstream_resource()->allocate() throws.

    2. -
      virtual void do_deallocate(void * p, std::size_t bytes, std::size_t alignment);
      +
      virtual void do_deallocate(void * p, std::size_t bytes, std::size_t alignment);

      Effects: Return the memory at p to the pool. It is unspecified if or under what circumstances this operation will result in a call to upstream_resource()->deallocate().

      Throws: Nothing.

    3. -
      virtual bool do_is_equal(const memory_resource & other) const noexcept;
      +
      virtual bool do_is_equal(const memory_resource & other) const noexcept;

      Returns: this == dynamic_cast<const unsynchronized_pool_resource*>(&other).

    @@ -188,7 +188,7 @@
    -PrevUpHomeNext +PrevUpHomeNext
    -- cgit v1.2.3