1 // mem/orbmm.cc -- The ORB memory manager for the kernel address space
3 // This software is copyright (c) 2006 Scott Wood <scott@buserror.net>.
5 // This software is provided 'as-is', without any express or implied warranty.
6 // In no event will the authors or contributors be held liable for any damages
7 // arising from the use of this software.
9 // Permission is hereby granted to everyone, free of charge, to use, copy,
10 // modify, prepare derivative works of, publish, distribute, perform,
11 // sublicense, and/or sell copies of the Software, provided that the above
12 // copyright notice and disclaimer of warranty be included in all copies or
13 // substantial portions of this software.
16 #include <kern/paging.h>
21 ORBMM *orbmm = &orbmm_real;
28 void *ORBMM::alloc(size_t size, int refs)
30 return reinterpret_cast<void *>(new u8[size]);
33 void ORBMM::retain(void *ptr, int refs)
38 void ORBMM::release(void *ptr, int refs)
43 void ORBMM::add_region(Region rgn, bool unmap, int refs)