Re: [PATCH v1 3/5] mem-pool: fill out functionality

2018-04-23 Thread Jameson Miller
On 04/23/2018 01:49 PM, Jonathan Tan wrote: On Mon, 23 Apr 2018 13:27:09 -0400 Jameson Miller wrote: This seems overly complicated - the struct mem_pool already has a linked list of pages, so couldn't you create a custom page and insert it behind the current front page instead whenever you n

Re: [PATCH v1 3/5] mem-pool: fill out functionality

2018-04-23 Thread Jonathan Tan
On Mon, 23 Apr 2018 13:27:09 -0400 Jameson Miller wrote: > > This seems overly complicated - the struct mem_pool already has a linked > > list of pages, so couldn't you create a custom page and insert it behind > > the current front page instead whenever you needed a large-size page? > > Yes - t

Re: [PATCH v1 3/5] mem-pool: fill out functionality

2018-04-23 Thread Jameson Miller
On 04/20/2018 07:21 PM, Jonathan Tan wrote: On Tue, 17 Apr 2018 16:34:42 + Jameson Miller wrote: @@ -19,8 +19,27 @@ struct mem_pool { /* The total amount of memory allocated by the pool. */ size_t pool_alloc; + + /* +* Array of pointers to "custom size" memor

Re: [PATCH v1 3/5] mem-pool: fill out functionality

2018-04-20 Thread Jonathan Tan
On Tue, 17 Apr 2018 16:34:42 + Jameson Miller wrote: > @@ -19,8 +19,27 @@ struct mem_pool { > > /* The total amount of memory allocated by the pool. */ > size_t pool_alloc; > + > + /* > + * Array of pointers to "custom size" memory allocations. > + * This is used f

[PATCH v1 3/5] mem-pool: fill out functionality

2018-04-17 Thread Jameson Miller
Adds the following functionality to memory pools: - Lifecycle management functions (init, discard) - Test whether a memory location is part of the managed pool - Function to combine 2 pools This also adds logic to track all memory allocations made by a memory pool. These functions will be u