Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor vmaddrSlide #44

Closed
p-x9 opened this issue Feb 9, 2024 · 1 comment · Fixed by #47
Closed

Refactor vmaddrSlide #44

p-x9 opened this issue Feb 9, 2024 · 1 comment · Fixed by #47

Comments

@p-x9
Copy link
Owner

p-x9 commented Feb 9, 2024

Improve processing when obtaining vmaddrSlide.
Currently, compare by path, but change to compare by pointer to improve performance.

public var vmaddrSlide: Int? {
guard self.path != nil else { return nil }
let indices = 0..<_dyld_image_count()
let index = indices.first { index in
guard let pathC = _dyld_get_image_name(index) else {
return false
}
let path = String(cString: pathC)
return path == self.path
}
return _dyld_get_image_vmaddr_slide(index ?? 0)
}
}

@p-x9
Copy link
Owner Author

p-x9 commented Feb 9, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant