1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:18:11 +00:00

UserspaceEmulator: Support the name argument in mmap for file backed mappings

This commit is contained in:
Itamar 2020-11-27 15:45:49 +02:00 committed by Andreas Kling
parent d2262b8f6d
commit 28cda567c1
3 changed files with 27 additions and 5 deletions

View file

@ -37,7 +37,7 @@ class MallocTracer;
class MmapRegion final : public Region {
public:
static NonnullOwnPtr<MmapRegion> create_anonymous(u32 base, u32 size, u32 prot);
static NonnullOwnPtr<MmapRegion> create_file_backed(u32 base, u32 size, u32 prot, int flags, int fd, off_t offset);
static NonnullOwnPtr<MmapRegion> create_file_backed(u32 base, u32 size, u32 prot, int flags, int fd, off_t offset, String name = {});
virtual ~MmapRegion() override;
virtual ValueWithShadow<u8> read8(u32 offset) override;
@ -71,6 +71,7 @@ private:
bool m_malloc { false };
OwnPtr<MallocRegionMetadata> m_malloc_metadata;
String m_name;
};
}