We currently hardcode the maximum VM address on iOS/AArch64, which is not really correct and this value changes between device configurations. Let's use TASK_VM_INFO to retrieve the maximum VM address dynamically.
The patch manually declares some constants, which would normally be provided in a header file by the SDK, but since this API is only declared in a recent SDK and we want to continue supporting building against older SDKs, the patch declares the constants manually.
Shouldn't this be a task_vm_info_data_t? Or is that not available?
As far as I can tell, integer_t are int, and we're not guaranteed to have this array properly aligned for that uptr load.
If it's not available, I'm ok with a stub somewhere, but I'd make this either a properly-sized and aligned struct, or a uptr array (proper alignment, AFAICT) and cast its pointer when calling task_info.