Re: [PATCH] irange_pool class

2020-09-28 Thread Andrew MacLeod via Gcc-patches
On 9/18/20 1:03 PM, Aldy Hernandez wrote: On 9/18/20 6:42 PM, Andrew MacLeod wrote: On 9/18/20 8:28 AM, David Malcolm wrote:I think of a "pool allocator" as something that makes a small number of large allocation under the covers, and then uses that to serve large numbers of fixed sized small a

Re: [PATCH] irange_pool class

2020-09-21 Thread Andrew MacLeod via Gcc-patches
On 9/19/20 4:32 PM, Martin Sebor wrote: On 9/18/20 3:09 PM, Andrew MacLeod wrote: On 9/18/20 4:35 PM, Martin Sebor wrote: Do you really need 6 or 10 subranges to find out the answer to the questions you are looking for?  most of the time, 2 or 3 pairs carries all the information anyone needs a

Re: [PATCH] irange_pool class

2020-09-20 Thread Aldy Hernandez via Gcc-patches
On 9/19/20 10:32 PM, Martin Sebor wrote: On 9/18/20 3:09 PM, Andrew MacLeod wrote: On 9/18/20 4:35 PM, Martin Sebor wrote: On 9/18/20 11:36 AM, Andrew MacLeod wrote: On it works exactly like one would expect a simple allocator to work.. as long as the allcoator is "live", its allocations

Re: [PATCH] irange_pool class

2020-09-19 Thread Andrew MacLeod via Gcc-patches
On 9/19/20 4:32 PM, Martin Sebor wrote: On 9/18/20 3:09 PM, Andrew MacLeod wrote: O What I meant by proxy is a substitute class each of whose objects stands in for a single instance of int_range where N is a runtime value.   There's no class like that. [Just to be clear, I don't meant for th

Re: [PATCH] irange_pool class

2020-09-19 Thread Martin Sebor via Gcc-patches
On 9/18/20 3:09 PM, Andrew MacLeod wrote: On 9/18/20 4:35 PM, Martin Sebor wrote: On 9/18/20 11:36 AM, Andrew MacLeod wrote: On it works exactly like one would expect a simple allocator to work.. as long as the allcoator is "live", its allocations are live.  once it is destructed, all the me

Re: [PATCH] irange_pool class

2020-09-18 Thread Andrew MacLeod via Gcc-patches
On 9/18/20 4:35 PM, Martin Sebor wrote: On 9/18/20 11:36 AM, Andrew MacLeod wrote: On it works exactly like one would expect a simple allocator to work.. as long as the allcoator is "live", its allocations are live.  once it is destructed, all the memory it manages is freed..    It purpose i

Re: [PATCH] irange_pool class

2020-09-18 Thread Martin Sebor via Gcc-patches
On 9/18/20 11:36 AM, Andrew MacLeod wrote: On 9/18/20 1:07 PM, Martin Sebor wrote: On 9/18/20 8:10 AM, Aldy Hernandez via Gcc-patches wrote: On 9/18/20 2:28 PM, David Malcolm wrote: On Fri, 2020-09-18 at 07:49 +0200, Aldy Hernandez wrote: On 9/18/20 3:43 AM, David Malcolm wrote: On Thu, 2

Re: [PATCH] irange_pool class

2020-09-18 Thread Andrew MacLeod via Gcc-patches
On 9/18/20 1:07 PM, Martin Sebor wrote: On 9/18/20 8:10 AM, Aldy Hernandez via Gcc-patches wrote: On 9/18/20 2:28 PM, David Malcolm wrote: On Fri, 2020-09-18 at 07:49 +0200, Aldy Hernandez wrote: On 9/18/20 3:43 AM, David Malcolm wrote: On Thu, 2020-09-17 at 12:36 +0200, Aldy Hernandez via

Re: [PATCH] irange_pool class

2020-09-18 Thread Martin Sebor via Gcc-patches
On 9/18/20 8:10 AM, Aldy Hernandez via Gcc-patches wrote: On 9/18/20 2:28 PM, David Malcolm wrote: On Fri, 2020-09-18 at 07:49 +0200, Aldy Hernandez wrote: On 9/18/20 3:43 AM, David Malcolm wrote: On Thu, 2020-09-17 at 12:36 +0200, Aldy Hernandez via Gcc-patches wrote: This is the irange s

Re: [PATCH] irange_pool class

2020-09-18 Thread Aldy Hernandez via Gcc-patches
On 9/18/20 6:42 PM, Andrew MacLeod wrote: On 9/18/20 8:28 AM, David Malcolm wrote:I think of a "pool allocator" as something that makes a small number of large allocation under the covers, and then uses that to serve large numbers of fixed sized small allocations and deallocations with O(1) usin

Re: [PATCH] irange_pool class

2020-09-18 Thread Andrew MacLeod via Gcc-patches
On 9/18/20 8:28 AM, David Malcolm wrote:I think of a "pool allocator" as something that makes a small number of large allocation under the covers, and then uses that to serve large numbers of fixed sized small allocations and deallocations with O(1) using a free list. Ah, I didn't know pool had

Re: [PATCH] irange_pool class

2020-09-18 Thread Aldy Hernandez via Gcc-patches
On 9/18/20 2:28 PM, David Malcolm wrote: On Fri, 2020-09-18 at 07:49 +0200, Aldy Hernandez wrote: On 9/18/20 3:43 AM, David Malcolm wrote: On Thu, 2020-09-17 at 12:36 +0200, Aldy Hernandez via Gcc-patches wrote: This is the irange storage class. It is used to allocate the minimum amount o

Re: [PATCH] irange_pool class

2020-09-18 Thread David Malcolm via Gcc-patches
On Fri, 2020-09-18 at 07:49 +0200, Aldy Hernandez wrote: > > On 9/18/20 3:43 AM, David Malcolm wrote: > > On Thu, 2020-09-17 at 12:36 +0200, Aldy Hernandez via Gcc-patches > > wrote: > > > This is the irange storage class. It is used to allocate the > > > minimum > > > amount of storage needed fo

Re: [PATCH] irange_pool class

2020-09-17 Thread Aldy Hernandez via Gcc-patches
On 9/17/20 8:02 PM, Martin Sebor wrote: > On 9/17/20 4:36 AM, Aldy Hernandez via Gcc-patches wrote: >> This is the irange storage class. It is used to allocate the minimum >> amount of storage needed for a given irange. Storage is automatically >> freed at destruction. >> >> It is meant for long

Re: [PATCH] irange_pool class

2020-09-17 Thread Aldy Hernandez via Gcc-patches
On 9/18/20 3:43 AM, David Malcolm wrote: On Thu, 2020-09-17 at 12:36 +0200, Aldy Hernandez via Gcc-patches wrote: This is the irange storage class. It is used to allocate the minimum amount of storage needed for a given irange. Storage is automatically freed at destruction. It is meant for

Re: [PATCH] irange_pool class

2020-09-17 Thread David Malcolm via Gcc-patches
On Thu, 2020-09-17 at 12:36 +0200, Aldy Hernandez via Gcc-patches wrote: > This is the irange storage class. It is used to allocate the > minimum > amount of storage needed for a given irange. Storage is > automatically > freed at destruction. > > It is meant for long term storage, as opposed

Re: [PATCH] irange_pool class

2020-09-17 Thread Martin Sebor via Gcc-patches
On 9/17/20 4:36 AM, Aldy Hernandez via Gcc-patches wrote: This is the irange storage class.  It is used to allocate the minimum amount of storage needed for a given irange.  Storage is automatically freed at destruction. It is meant for long term storage, as opposed to int_range_max which is

[PATCH] irange_pool class

2020-09-17 Thread Aldy Hernandez via Gcc-patches
This is the irange storage class. It is used to allocate the minimum amount of storage needed for a given irange. Storage is automatically freed at destruction. It is meant for long term storage, as opposed to int_range_max which is meant for intermediate temporary results on the stack. Th