mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:18:12 +00:00
Start working on memory-mapped files.
First of all, change sys$mmap to take a struct SC_mmap_params since our sycsall calling convention can't handle more than 3 arguments. This exposed a bug in Syscall::invoke() needing to use clobber lists. It was a bit confusing to debug. :^)
This commit is contained in:
parent
41a751c90c
commit
fdbd9f1e27
14 changed files with 82 additions and 26 deletions
|
@ -9,6 +9,7 @@
|
|||
#include <AK/Vector.h>
|
||||
#include <AK/HashTable.h>
|
||||
#include <AK/String.h>
|
||||
#include <VirtualFileSystem/VirtualFileSystem.h>
|
||||
|
||||
class Process;
|
||||
extern Process* current;
|
||||
|
@ -71,6 +72,9 @@ struct Region : public Retainable<Region> {
|
|||
return (laddr - linearAddress).get() / PAGE_SIZE;
|
||||
}
|
||||
|
||||
RetainPtr<VirtualFileSystem::Node> m_file;
|
||||
Unix::off_t m_file_offset { 0 };
|
||||
|
||||
LinearAddress linearAddress;
|
||||
size_t size { 0 };
|
||||
Vector<RetainPtr<PhysicalPage>> physical_pages;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue