diff options
author | Alexis211 <alexis211@gmail.com> | 2009-10-17 12:59:11 +0200 |
---|---|---|
committer | Alexis211 <alexis211@gmail.com> | 2009-10-17 12:59:11 +0200 |
commit | 45fcf4cc7ddacd93df2dd4d88ad31f6061e8d4a8 (patch) | |
tree | 4f1a3b3d301cded70af6ff9177d13b8a51f2d825 /Source/Kernel/TaskManager/Process.class.h | |
parent | 54d76800cf8010434065556e12f693b101383d8b (diff) | |
parent | 82756b86977dc65468f6298787d8dca5634ac788 (diff) | |
download | Melon-45fcf4cc7ddacd93df2dd4d88ad31f6061e8d4a8.tar.gz Melon-45fcf4cc7ddacd93df2dd4d88ad31f6061e8d4a8.zip |
Merge branch 'heap_class'
Conflicts:
Source/Kernel/Melon.ke
Diffstat (limited to 'Source/Kernel/TaskManager/Process.class.h')
-rw-r--r-- | Source/Kernel/TaskManager/Process.class.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/Source/Kernel/TaskManager/Process.class.h b/Source/Kernel/TaskManager/Process.class.h index b975db1..ac9614e 100644 --- a/Source/Kernel/TaskManager/Process.class.h +++ b/Source/Kernel/TaskManager/Process.class.h @@ -5,6 +5,7 @@ #include <Library/Vector.class.h> #include <Library/SimpleList.class.h> #include <MemoryManager/PageDirectory.class.h> +#include <MemoryManager/Heap.class.h> #include <VTManager/VirtualTerminal.proto.h> #define P_ZOMBIE 0 @@ -15,7 +16,10 @@ #define E_ABORTED 0x0FFFFF01 #define E_UNHANDLED_EXCEPTION 0x0FFFFF02 -#define STACKSIZE 4096 //Can change +#define STACKSIZE 4096 //Could change + +#define USERHEAPINITSIZE 0x00010000 //Heap initially is 64k, but can grow +#define USERHEAPSTART 0xB7000000 //Heap is at 0xB7000000, 128Mo before kernel space. class Thread; class File; @@ -32,9 +36,10 @@ class Process { u8int m_state; //Is one of P_* defined above PageDirectory* m_pagedir; u32int m_uid; //User ID - u32int m_stacksstart; VirtualTerminal *m_vt; + Heap *m_userHeap; + Vector<Thread*> m_threads; SimpleList<File*> *m_fileDescriptors; @@ -43,8 +48,9 @@ class Process { Process(String cmdline, u32int uid); ~Process(); - u32int stackAlloc(); //Allocates pages for STACKSIZE bytes at end of app memory (just before 0xC0000000) - void exit(); //Exits properly process by killing all threads + Heap& heap() { return *m_userHeap; } + + void exit(); //Exits properly process by killing all threads and deleting file descriptors void registerThread(Thread* t); //Called when a thread starts void threadFinishes(Thread* thread, u32int retval); //Called when a thread finishes |