mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-21 18:00:16 +00:00
LibC: Add mmap_with_name() that names the allocation immediately.
This allows us to skip the separate call to set_mmap_name() in code that we control, e.g malloc() and GraphicsBitmap.
This commit is contained in:
parent
5f26f83451
commit
189b342e6f
Notes:
sideshowbarker
2024-07-19 14:01:04 +09:00
Author: https://github.com/awesomekling
Commit: 189b342e6f
8 changed files with 28 additions and 13 deletions
|
@ -31,8 +31,7 @@ void setgrent()
|
|||
perror("open /etc/group");
|
||||
}
|
||||
assert(__grdb_stream);
|
||||
__grdb_entry = (struct group_with_strings*)mmap(nullptr, getpagesize(), PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, 0, 0);
|
||||
set_mmap_name(__grdb_entry, getpagesize(), "setgrent");
|
||||
__grdb_entry = (struct group_with_strings*)mmap_with_name(nullptr, getpagesize(), PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, 0, 0, "setgrent");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue