darling
darling copied to clipboard
Implement `vmmap`
Tool What tool is missing? What is it supposed to do? Is it or a variant open-source?
vmmap is missing.
vmmap itself is not open-source, but I've actually got an open source variant working on Big Sur (threw the code away though).
Example Command What is an example command for this tool?
Taken from CoreCLR source:
char vmmapCommand[100];
int chars = snprintf(vmmapCommand, sizeof(vmmapCommand), "/usr/bin/vmmap -interleaved %d -wide", dwProcessId);
_ASSERTE(chars > 0 && chars <= sizeof(vmmapCommand));
System Information What system are you running?
| Software | Version |
|---|---|
| Darling | 289628cccf0cd7567c1d275f09600ad214d26acd |
An additional note:
As Darling runs specifically on Linux, we might be able to exploit the procfs maps.
The tool I tested is known to be missing regions compared to the real vmmap.
There is an open source reimplementation, but it lacks support for all the parameters.
This one worked on my Big Sur, but doesn't work on Darling (problem with mach_vm_region_recurse I guess?).
There is an open source reimplementation, but it lacks support for all the parameters.
Also it doesn't compile at all.

I have a basically working implementation of vmmap on Darling in C++, and I'm planning to release it under the MIT license.
It may be merged into Darling if you're interested.
https://github.com/trungnt2910/vmmap
Here, if you are interested.