mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
AK: Update mmap name for MappedFiles on SerenityOS
Looking at process memory maps is a lot nicer when you can see the paths of MappedFile mappings.
This commit is contained in:
parent
efa9627fc4
commit
58b5a8f3c0
Notes:
sideshowbarker
2024-07-18 07:47:56 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/58b5a8f3c05
1 changed files with 6 additions and 0 deletions
|
@ -37,6 +37,12 @@ Result<NonnullRefPtr<MappedFile>, OSError> MappedFile::map(const String& path)
|
|||
if (ptr == MAP_FAILED)
|
||||
return OSError(errno);
|
||||
|
||||
#ifdef __serenity__
|
||||
if (set_mmap_name(ptr, size, path.characters()) < 0) {
|
||||
perror("set_mmap_name");
|
||||
}
|
||||
#endif
|
||||
|
||||
return adopt_ref(*new MappedFile(ptr, size));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue