- int remain = KEXEC_RSVD - table_usage;
- pfn_t kimg_pagecount =
- pfn(__far(__kexec_end) - __far(__kexec_start));
- if (kimg_pagecount > remain * _PAGE_LEVEL_SIZE) {
- // ERROR: require more pages
- // here should do something else other than head into blocking
+ int remain = KEXEC_RSVD - alloc.pt_usage;
+ if (leaf_count(maps->ksize) > remain * _PAGE_LEVEL_SIZE)
+ {