diff options
author | Alexis211 <alexis211@gmail.com> | 2009-10-18 15:27:34 +0200 |
---|---|---|
committer | Alexis211 <alexis211@gmail.com> | 2009-10-18 15:27:34 +0200 |
commit | 323e12f1f9ab33df15dcfed210e807561d98fa8c (patch) | |
tree | 7d76e6932d4a979a1f2bfafc94478b66b1479bbc /Source/Kernel/common.h | |
parent | bc2eccdd11c27029096fb3e891073503eb269e27 (diff) | |
download | Melon-323e12f1f9ab33df15dcfed210e807561d98fa8c.tar.gz Melon-323e12f1f9ab33df15dcfed210e807561d98fa8c.zip |
Re-organized everything
Diffstat (limited to 'Source/Kernel/common.h')
-rw-r--r-- | Source/Kernel/common.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Source/Kernel/common.h b/Source/Kernel/common.h new file mode 100644 index 0000000..c6da25e --- /dev/null +++ b/Source/Kernel/common.h @@ -0,0 +1,28 @@ +#ifndef DEF_COMMON +#define DEF_COMMON + +#include <Config.h> + +//This file is very important : it contains type definitions, macro definitions and new/delete implementations. + +#define NULL 0 + +#include <types.h> + +#include <CMem.ns.h> +#include <Core/Sys.ns.h> + +#include <MemoryManager/Mem.ns.h> + +//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::kalloc(sz); } +inline void* operator new[](u32int sz) { return Mem::kalloc(sz); } +inline void operator delete(void *ptr) { Mem::kfree(ptr); } +inline void operator delete[](void *ptr) { Mem::kfree(ptr); } + +#endif |