More fixes

Andrei Nigmatulin anight@monamour.ru
Wed, 28 Jul 2004 19:00:19 +0400


--=-CnTzRe7P61pDivyLVB5K
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
>=20
> 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:
>=20
> -        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=
nfo.arena);

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 ;-)

>=20
> 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.
>=20
> I'll commit the patch after reviewing/testing it some more.

--=20
Andrei Nigmatulin
GPG PUB KEY 6449830D


--=-CnTzRe7P61pDivyLVB5K
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: =?koi8-r?Q?=FC=D4=C1?= =?koi8-r?Q?_=DE=C1=D3=D4=D8?=
	=?koi8-r?Q?_=D3=CF=CF=C2=DD=C5=CE=C9=D1?=
	=?koi8-r?Q?_=D0=CF=C4=D0=C9=D3=C1=CE=C1?=
	=?koi8-r?Q?_=C3=C9=C6=D2=CF=D7=CF=CA?=
	=?koi8-r?Q?_=D0=CF=C4=D0=C9=D3=D8=C0?=

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQBBB7+DtpDBPmRJgw0RAtFDAKCpdOxOQUgAbSIvifq3vM/by220CACgjAtD
WofVcia1eVvAxOcb9jYyJq0=
=O1ft
-----END PGP SIGNATURE-----

--=-CnTzRe7P61pDivyLVB5K--