More fixes

Andrei Nigmatulin
Wed, 28 Jul 2004 19:00:19 +0400

Content-Type: text/plain; charset=koi8-r
Content-Transfer-Encoding: quoted-printable

=F7 =F3=D2=C4, 28.07.2004, =D7 18:50, Anatoly Vorobey =D0=C9=DB=C5=D4:
> On Fri, Jul 23, 2004 at 03:55:19PM +0400, Andrei Nigmatulin wrote:
> > Hello,
> >=20
> > This is my two cents for memcached ;-)
> >=20
> > - Fixed unsafe realloc usage
> > - Fixed some format string types
> > - Fixed off-by-one overflow
> > - Fixed possible memory leaks
> > - Some optimizations and trivial fixes
> Thanks, these are very appreciated. I reviewed the changes, and they all=20
> make good sense to me, except this one, where I don't understand why you=20
> bother with the conversion:
> -        pos +=3D sprintf(pos, "STAT arena_size %d\r\n", info.arena);
> +        pos +=3D sprintf(pos, "STAT arena_size %u\r\n", (unsigned int) i=

The reason is simple - when my heap grows over 2Gb i start see negative
values here. I dont know why structure mallinfo using signed ints - lets
address this question to glibc developers ;-)

> etc. info.arena and all the other fields are already int. But anyway,=20
> this stat command hasn't been important for almost a year now, ever=20
> since we made a decision to never rely on malloc's handling=20
> of fragmentation. Perhaps we should just get rid of it.
> I'll commit the patch after reviewing/testing it some more.

Andrei Nigmatulin
GPG PUB KEY 6449830D

Content-Type: application/pgp-signature; name=signature.asc
Content-Description: =?koi8-r?Q?=FC=D4=C1?= =?koi8-r?Q?_=DE=C1=D3=D4=D8?=

Version: GnuPG v1.2.4 (GNU/Linux)