[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 10/31] libxl: Crash (more sensibly) on malloc failure

Ian Campbell writes ("Re: [Xen-devel] [PATCH 10/31] libxl: Crash (more 
sensibly) on malloc failure"):
> On Wed, 2012-04-11 at 11:24 +0100, Ian Jackson wrote:
> > Things left to do:
> >  - Provide versions of malloc, realloc and free which do the
> >    checking but which do not enroll the pointer in the gc.
> We got that in the next patch?

Yes.  I don't think this bullet point is actually helpful in that
commit message as it's not so much a deficiency in the code at that
point as a thing I was intending to fix when I wrote it, so I have
removed it.

> > Well, zero isn't adequate :-).  So yes, it's arbitrary.  25 is 100
> > bytes (i386) or 200 bytes (amd64) which seems a reasonable initial
> > overhead and will probably avoid triggering a realloc too often.
> Why isn't just doubling each time adequate?

alloc_maxsize is initialised to 0.  Doubling zero gives zero.

NB that libxl__ptr_add needs to be rewritten not to be quadratic in
the number of pointrs added (!)


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.