mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:07:47 +00:00
Move Region and Subregion out of Process and make them free classes.
This commit is contained in:
parent
3e532ac7b6
commit
fce81d376c
4 changed files with 45 additions and 44 deletions
|
@ -10,12 +10,12 @@
|
|||
#include "TTY.h"
|
||||
|
||||
class FileHandle;
|
||||
class Region;
|
||||
class Subregion;
|
||||
class Zone;
|
||||
|
||||
class Process : public InlineLinkedListNode<Process> {
|
||||
friend class InlineLinkedListNode<Process>;
|
||||
struct Region;
|
||||
struct Subregion;
|
||||
public:
|
||||
static Process* createKernelProcess(void (*entry)(), String&& name);
|
||||
static Process* createUserProcess(const String& path, uid_t, gid_t, pid_t parentPID, int& error, const char** args = nullptr, TTY* = nullptr);
|
||||
|
@ -179,26 +179,6 @@ private:
|
|||
|
||||
TTY* m_tty { nullptr };
|
||||
|
||||
struct Region : public Retainable<Region> {
|
||||
Region(LinearAddress, size_t, RetainPtr<Zone>&&, String&&);
|
||||
~Region();
|
||||
LinearAddress linearAddress;
|
||||
size_t size { 0 };
|
||||
RetainPtr<Zone> zone;
|
||||
String name;
|
||||
};
|
||||
|
||||
struct Subregion {
|
||||
Subregion(Region&, dword offset, size_t, LinearAddress, String&& name);
|
||||
~Subregion();
|
||||
|
||||
RetainPtr<Region> region;
|
||||
dword offset;
|
||||
size_t size { 0 };
|
||||
LinearAddress linearAddress;
|
||||
String name;
|
||||
};
|
||||
|
||||
Region* allocateRegion(size_t, String&& name);
|
||||
Region* allocateRegion(size_t, String&& name, LinearAddress);
|
||||
bool deallocateRegion(Region& region);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue