start: allocate memory for kernel according to its size