Written code for merging memmap entry flags