This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Bug middle-end/37448] patch to compute alloc-pool stats correctly


Kenneth Zadeck <zadeck@naturalbridge.com> writes:

> 2008-09-26  Kenneth Zadeck <zadeck@naturalbridge.com>
>
>     PR rtl-optimization/37448
>     alloc_pool_desc (elt_size): New field.
>     alloc-pool.c (create_alloc_pool, empty_alloc_pool, pool_alloc,
>     pool_free): Properly keep track of desc->size.
>     (print_statistics, dump_alloc_pool_statistics): Enhance the
>     printing of statistics to print the number of elements.


> -/* Store information about each particular alloc_pool.  */
> +/* Store information about each particular alloc_pool.  Note that this
> +   will underestimate the amount the amount of storage used by a small amount:
> +   1) The overhead in a pool is not accounted for.
> +   2) The unallocated elements in a block are not accounted for.  Note
> +   that this can at worst case be one element smaller that the block
> +   size for that pool.
> +*/

Please put the */ at the end of the previous line.

I wonder if some of the types in alloc_pool_descriptor should be
size_t rather than int, though it's hard to imagine it making a
difference in real life.

OK with that change.

Thanks.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]