mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:37:35 +00:00
Make font loading use mmap().
This exposed a serious race condition in page_in_from_inode(). Reordered the logic and added a paging lock to VMObject. Now, only one process can page in from a VMObject at a time. There are definitely ways to optimize this, for instance by making the locking be per-page instead. It's not something that I'm going to worry about right now though.
This commit is contained in:
parent
7f91aec25c
commit
abe3f515b1
4 changed files with 65 additions and 39 deletions
|
@ -12,6 +12,8 @@ public:
|
|||
|
||||
RetainPtr<Font> clone() const;
|
||||
|
||||
static RetainPtr<Font> load_from_memory(const byte*);
|
||||
|
||||
#ifdef USERLAND
|
||||
static RetainPtr<Font> load_from_file(const String& path);
|
||||
bool write_to_file(const String& path);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue