mirror of https://github.com/python/cpython.git
gh-129430: Make walking vm regions more efficient in MacOS (#129494)
This commit is contained in:
parent
79f85a0bc1
commit
7eaef74561
|
@ -232,15 +232,15 @@ search_map_for_section(pid_t pid, const char* secname, const char* substr) {
|
||||||
&count,
|
&count,
|
||||||
&object_name) == KERN_SUCCESS)
|
&object_name) == KERN_SUCCESS)
|
||||||
{
|
{
|
||||||
int path_len = proc_regionfilename(
|
if ((region_info.protection & VM_PROT_READ) == 0
|
||||||
pid, address, map_filename, MAXPATHLEN);
|
|| (region_info.protection & VM_PROT_EXECUTE) == 0) {
|
||||||
if (path_len == 0) {
|
|
||||||
address += size;
|
address += size;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((region_info.protection & VM_PROT_READ) == 0
|
int path_len = proc_regionfilename(
|
||||||
|| (region_info.protection & VM_PROT_EXECUTE) == 0) {
|
pid, address, map_filename, MAXPATHLEN);
|
||||||
|
if (path_len == 0) {
|
||||||
address += size;
|
address += size;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue