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

2018-05-03 Thread Duy Nguyen
Another I noticed in the jm/mem-pool series is this loop in mem_pool_alloc() for (p = mem_pool->mp_block; p; p = p->next_block) if (p->end - p->next_free >= len) break; You always go from the start (mp_block) but at some point those first blocks are filled up and we don't

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

2018-05-01 Thread Jameson Miller
gt; Cc: git@vger.kernel.org; gits...@pobox.com; pclo...@gmail.com; > jonathanta...@google.com > Subject: Re: [PATCH v2 3/5] mem-pool: fill out functionality > > On Mon, Apr 30, 2018 at 8:31 AM, Jameson Miller <jam...@microsoft.com> > wrote: > > Adds the following function

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

2018-04-30 Thread Stefan Beller
On Mon, Apr 30, 2018 at 8:31 AM, Jameson Miller wrote: > 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

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

2018-04-30 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