[Dune] [Dune-Commit] dune-common r5386 - trunk/common

Oliver Sander sander at mi.fu-berlin.de
Wed Dec 3 07:46:43 CET 2008


Thank you!

mblatt at dune-project.org schrieb:
> Author: mblatt
> Date: 2008-12-02 14:10:35 +0100 (Tue, 02 Dec 2008)
> New Revision: 5386
>
> Modified:
>    trunk/common/poolallocator.hh
> Log:
> Adapted docu to make users and Oliver happy :)
>
>
> Modified: trunk/common/poolallocator.hh
> ===================================================================
> --- trunk/common/poolallocator.hh	2008-12-02 12:27:03 UTC (rev 5385)
> +++ trunk/common/poolallocator.hh	2008-12-02 13:10:35 UTC (rev 5386)
> @@ -75,6 +75,9 @@
>     * @warning Due to aligned issues at the number of bytes of the 
>     * alignment prerequisite (< 4 bytes) are wasted. This effect
>     * becomes neglectable for big sizes of chunkSize.
> +   *
> +   * \tparam T The type that is allocated by us.
> +   * \tparam s The size of a memory chunk in bytes.
>     */
>    template<class T, std::size_t s>
>    class Pool
> @@ -221,9 +224,16 @@
>     * This allocator is specifically useful for small data types
>     * where new and delete are too expensive. 
>     *
> +   * It uses a pool of memory chunks where the objects will be allocated.
> +   * This means that assuming that N objects fit into memory only every N-th
> +   * rewuest for an object will result in memory allocation.
> +   *
>     * @warning It is not suitable
>     * for the use in standard containers as it cannot allocate
>     * arrays of arbitrary size
> +   *
> +   * \tparam T The type that will be allocated.
> +   * \tparam s The number of elements to fit into one memory chunk.
>     */
>    template<class T, std::size_t s>
>    class PoolAllocator
> @@ -239,7 +249,7 @@
>      enum
>        {
>  	/**
> -	 * @brief The size in bytes to use for every memory chunk
> +	 * @brief The number of object to fit into one memory chunk
>  	 * allocated.
>  	 */
>  	size=s*sizeof(value_type)
>
>
> _______________________________________________
> Dune-Commit mailing list
> Dune-Commit at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune-commit
>   


-- 
************************************************************************
* Oliver Sander                ** email: sander at mi.fu-berlin.de        *
* Freie Universität Berlin     ** phone: + 49 (30) 838 75217           *
* Institut für Mathematik      ** URL  : page.mi.fu-berlin.de/~sander  *
* Arnimallee 6                 ** -------------------------------------*
* 14195 Berlin, Germany        ** Member of MATHEON (www.matheon.de)   *
************************************************************************





More information about the Dune mailing list