mirror of
https://github.com/drasko/codezero.git
synced 2026-01-24 00:33:14 +01:00
Initial commit
This commit is contained in:
32
tasks/mm0/include/memory.h
Normal file
32
tasks/mm0/include/memory.h
Normal file
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Physical page descriptor
|
||||
*
|
||||
* Copyright (C) 2007 Bahadir Balban
|
||||
*/
|
||||
#ifndef __MEMORY_H__
|
||||
#define __MEMORY_H__
|
||||
|
||||
#include <vm_area.h>
|
||||
#include <kdata.h>
|
||||
|
||||
struct membank {
|
||||
unsigned long start;
|
||||
unsigned long end;
|
||||
unsigned long free;
|
||||
struct page *page_array;
|
||||
};
|
||||
extern struct membank membank[];
|
||||
extern struct vm_file *swap_file;
|
||||
|
||||
void init_mm_descriptors(struct page_bitmap *page_map,
|
||||
struct bootdesc *bootdesc, struct membank *membank);
|
||||
void init_physmem(struct initdata *initdata, struct membank *membank);
|
||||
|
||||
void init_zero_page(void);
|
||||
void *get_zero_page(void);
|
||||
void put_zero_page(void);
|
||||
|
||||
int do_mmap(struct vm_file *mapfile, unsigned long f_offset, struct tcb *t,
|
||||
unsigned long map_address, unsigned int flags, unsigned int pages);
|
||||
|
||||
#endif /* __MEMORY_H__ */
|
||||
Reference in New Issue
Block a user