[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Minios-devel] [UNIKRAFT PATCH] lib/ukalloc: uk_getmallocsize should return size not order
Hi Florian,
I've responded below On Mon, Jul 23, 2018 at 5:52 PM, Florian Schmidt <Florian.Schmidt@xxxxxxxxx> wrote: Hi Radu, I'll format the patches I send like this from now on :)
uk_getmallocsize() takes the order from uk_get_real_start() and does (pagesize<<order). The problem is that the result of that shift will include the size of the metadata. The check I introduces determines the size of the metadata depending on whether the pointer is page aligned or not which it then subtracts from the mallocsize. You need to do this as realloc needs the size of the malloc (without metadata size). I agree that functions check for the same thing, but the actions differ - uk_get_real_start() determines location of the metadata, uk_getmallocsize() uses the metadata and determines the allocated size.
Cheers, Radu _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |