Mercurial > hg > Members > kono > Cerium
annotate include/TaskManager/base.h @ 109:5c194c71eca8
Cerium cvs version
author | gongo@gendarme.local |
---|---|
date | Wed, 12 Nov 2008 17:39:33 +0900 |
parents | |
children | d5cca23ed50c |
rev | line source |
---|---|
109 | 1 #include <new> |
2 #include <stdlib.h> | |
3 #include <stdio.h> | |
4 | |
5 | |
6 //#ifdef __SPU__ | |
7 #if 0 | |
8 # define BASE_NEW_DELETE(T) \ | |
9 /* override new/detele */ \ | |
10 static void* operator new(size_t size) { \ | |
11 if ((int)size == 0) { \ | |
12 size = 1; \ | |
13 } \ | |
14 \ | |
15 void *ptr = malloc(size); \ | |
16 return ptr; \ | |
17 } \ | |
18 static void operator delete(void* rawMemory, size_t size) { \ | |
19 free(rawMemory); \ | |
20 } \ | |
21 | |
22 #else | |
23 # define BASE_NEW_DELETE(T) | |
24 #endif | |
25 |