Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- kern_return_t krc = KERN_SUCCESS;
- vm_address_t address = 0;
- vm_size_t size = 0;
- uint32_t depth = 1;
- while (1) {
- struct vm_region_submap_info_64 info;
- mach_msg_type_number_t count = VM_REGION_SUBMAP_INFO_COUNT_64;
- krc = vm_region_recurse_64(port, &address, &size, &depth, (vm_region_info_64_t)&info, &count);
- if (krc == KERN_INVALID_ADDRESS){
- break;
- }
- if (info.is_submap){
- depth++;
- }
- else {
- //do stuff
- printf ("Found region: %08x to %08xn", (uint32_t)address, (uint32_t)address+size);
- address += size;
- }
- }
Add Comment
Please, Sign In to add comment