Stupidly simple process memory manager with brk()

This commit is contained in:
2018-03-01 15:12:35 +01:00
parent 19d58ec71d
commit 4ecec1eec6
6 changed files with 41 additions and 10 deletions

View File

@@ -3,15 +3,18 @@
#include <scheduler.h>
#include <stdint.h>
#include <interrupts.h>
#include <stddef.h>
struct process
{
uint64_t pid;
void *stack_ptr;
uint64_t state;
uint64_t P4;
uint64_t brk;
uint64_t stack;
QUEUE_SPOT(runQ);
uint8_t stack[];
};
struct process *process();
@@ -21,3 +24,5 @@ void yield();
void start_scheduler();
void switch_stack(void *old_ptr, void *new_ptr);
uint64_t procmm_brk(struct process *p, void *addr);