diff options
author | Alexis211 <alexis211@gmail.com> | 2009-10-20 19:23:33 +0200 |
---|---|---|
committer | Alexis211 <alexis211@gmail.com> | 2009-10-20 19:23:33 +0200 |
commit | 768ada13917aeda373e6ff5fee21faf90c963746 (patch) | |
tree | 9e26d7d65e1693d1a7f9fd93c9fd33b41d175464 /Source/Library/Userland/common.h | |
parent | 6ec4b3d31080f90393e72989d559cfb76eff6f9d (diff) | |
parent | 9836acd720988af30250c2c1ec18d618664dea4e (diff) | |
download | Melon-768ada13917aeda373e6ff5fee21faf90c963746.tar.gz Melon-768ada13917aeda373e6ff5fee21faf90c963746.zip |
Merge branch 'usermode_syscalls'
Conflicts:
Source/Kernel/Makefile
Diffstat (limited to 'Source/Library/Userland/common.h')
-rw-r--r-- | Source/Library/Userland/common.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/Source/Library/Userland/common.h b/Source/Library/Userland/common.h new file mode 100644 index 0000000..6257841 --- /dev/null +++ b/Source/Library/Userland/common.h @@ -0,0 +1,27 @@ +#ifndef DEF_COMMON +#define DEF_COMMON + +#define NULL 0 + +#include <types.h> + +#include <CMem.ns.h> + +namespace Mem { + void* alloc(u32int); + void free(void*); + void* mkXchgSpace(u32int sz); +} + +//Standard implemenations of operator new/delete +inline void* operator new(u32int, void *p) { return p; } +inline void* operator new[](u32int, void *p) { return p; } +inline void operator delete(void*, void*) { } +inline void operator delete[](void*, void*) { } + +inline void* operator new(u32int sz) { return Mem::alloc(sz); } +inline void* operator new[](u32int sz) { return Mem::alloc(sz); } +inline void operator delete(void *ptr) { Mem::free(ptr); } +inline void operator delete[](void *ptr) { Mem::free(ptr); } + +#endif |