This repository has been archived by the owner on Feb 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mm: Eliminate d_path_outlen() and further speed up show_map_vma()
d_path_outlen() isn't needed because we know that d_path() always populates the given buffer backwards starting from the last byte; with this, we can easily calculate the length of the generated string by using the returned pointer from d_path() and the size of the buffer given to d_path(). This eliminates the need for d_path_outlen() and removes the bizarre strlen() usage, which makes things simpler and faster. We also now avoid a memmove() when d_path() completely uses up its provided buffer. Signed-off-by: Sultan Alsawaf <[email protected]> Change-Id: Ia52d062e7e12d9075a092f334ae49d9085fef03f
- Loading branch information
1 parent
1b5a371
commit 016a204
Showing
3 changed files
with
9 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters