Re: [Xen-devel] [PATCH v2] xmalloc: add support for checking the pool integrity

2014-12-08 Thread Mihai Donțu
On Monday 08 December 2014 16:04:55 Ian Campbell wrote: > On Mon, 2014-12-08 at 18:00 +0200, Mihai Donțu wrote: > > On Monday 08 December 2014 10:18:01 Jan Beulich wrote: > > > >>> On 08.12.14 at 03:30, wrote: > > > > +#ifndef NDEBUG > > > > +static bool_t xmem_pool_check_size(const struct bhdr *b

Re: [Xen-devel] [PATCH v2] xmalloc: add support for checking the pool integrity

2014-12-08 Thread Jan Beulich
>>> On 08.12.14 at 17:00, wrote: > On Monday 08 December 2014 10:18:01 Jan Beulich wrote: >> >>> On 08.12.14 at 03:30, wrote: >> > +#ifndef NDEBUG >> > +static bool_t xmem_pool_check_size(const struct bhdr *b, int fl, int sl) >> > +{ >> > +while ( b ) >> > +{ >> > +int __fl; >> >

Re: [Xen-devel] [PATCH v2] xmalloc: add support for checking the pool integrity

2014-12-08 Thread Ian Campbell
On Mon, 2014-12-08 at 18:00 +0200, Mihai Donțu wrote: > On Monday 08 December 2014 10:18:01 Jan Beulich wrote: > > >>> On 08.12.14 at 03:30, wrote: > > > +#ifndef NDEBUG > > > +static bool_t xmem_pool_check_size(const struct bhdr *b, int fl, int sl) > > > +{ > > > +while ( b ) > > > +{ > >

Re: [Xen-devel] [PATCH v2] xmalloc: add support for checking the pool integrity

2014-12-08 Thread Mihai Donțu
On Monday 08 December 2014 10:18:01 Jan Beulich wrote: > >>> On 08.12.14 at 03:30, wrote: > > +#ifndef NDEBUG > > +static bool_t xmem_pool_check_size(const struct bhdr *b, int fl, int sl) > > +{ > > +while ( b ) > > +{ > > +int __fl; > > +int __sl; > > + > > +MAPPIN

Re: [Xen-devel] [PATCH v2] xmalloc: add support for checking the pool integrity

2014-12-08 Thread Jan Beulich
>>> On 08.12.14 at 03:30, wrote: > +#ifndef NDEBUG > +static bool_t xmem_pool_check_size(const struct bhdr *b, int fl, int sl) > +{ > +while ( b ) > +{ > +int __fl; > +int __sl; > + > +MAPPING_INSERT(b->size, &__fl, &__sl); > +if ( __fl != fl || __sl != sl )

Re: [Xen-devel] [PATCH v2] xmalloc: add support for checking the pool integrity

2014-12-07 Thread Mihai Donțu
On Mon, 8 Dec 2014 04:30:48 +0200 Mihai Donțu wrote: > Implemented xmem_pool_check(), xmem_pool_check_locked() and > xmem_pool_check_unlocked() to verity the integrity of the TLSF matrix. > > Signed-off-by: Mihai Donțu > > --- > Changes since v1: > - fixed the codingstyle > - swaped _locked/_u

[Xen-devel] [PATCH v2] xmalloc: add support for checking the pool integrity

2014-12-07 Thread Mihai Donțu
Implemented xmem_pool_check(), xmem_pool_check_locked() and xmem_pool_check_unlocked() to verity the integrity of the TLSF matrix. Signed-off-by: Mihai Donțu --- Changes since v1: - fixed the codingstyle - swaped _locked/_unlocked naming - reworked __xmem_pool_check_locked() a bit - used boo