00001
00007
00008
00009 #ifndef _MEMORY_H_
00010 #define _MEMORY_H_
00011
00018 #define roundew(x) (void *)( (3 + (ulong)(x)) & ~0x03 )
00019 #define truncew(x) (void *)( ((ulong)(x)) & ~0x03 )
00020
00028 #define roundmb(x) (void *)( (7 + (ulong)(x)) & ~0x07 )
00029 #define truncmb(x) (void *)( ((ulong)(x)) & ~0x07 )
00030
00031 struct memblock
00032 {
00033 struct memblock *next;
00034 ulong length;
00035 };
00036
00037 extern struct memblock freelist;
00039 extern void *minheap;
00040 extern void *end;
00042
00043 syscall freemem(void *pmem);
00044 void *getmem(ulong nbytes);
00045
00046 #endif