Maksym Planeta, le Wed 30 Mar 2011 08:49:01 +0300, a écrit : > +#define KALLOC_MAP_SIZE 8 * 1024 * 1024 > +#define ZONE_START_ORDER 4 > +#define ZONES_COUNT 12 > +#define ZONE_MAX_ORDER (ZONES_COUNT + ZONE_START_ORDER - 1) > +#define SIZE_BY_ORDER(x) (1UL << (ZONE_START_ORDER + x)) > +#define ZONE_MAX_SIZE SIZE_BY_ORDER(ZONES_COUNT - 1) > +#define MINSIZE (1 << ZONE_START_ORDER) > +#define KALLOC_MAX ((PAGE_SIZE < ZONE_MAX_SIZE) ? KALLOC_MAX = ZONE_MAX_SIZE > : PAGE_SIZE)
Please separate tunable parameters from computed parameters. > kalloc_map = kmem_suballoc(kernel_map, &min, &max, > - kalloc_map_size, FALSE); > + KALLOC_MAP_SIZE, FALSE); Please keep indentation as it is: the start of the second line is aligned with the parenthesis. > > -void > + void > kfree(data, size) Please avoid spurious changes. I'll have to have a closer look, but the principles seem sane (though I don't think that's what will make Mach a lot faster :) ) Samuel