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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
1 #include <new>
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
2 #include <stdlib.h>
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
3 #include <stdio.h>
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
4
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
5
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
6 //#ifdef __SPU__
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
7 #if 0
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
8 # define BASE_NEW_DELETE(T) \
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
9 /* override new/detele */ \
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
10 static void* operator new(size_t size) { \
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
11 if ((int)size == 0) { \
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
12 size = 1; \
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
13 } \
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
14 \
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
15 void *ptr = malloc(size); \
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
16 return ptr; \
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
17 } \
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
18 static void operator delete(void* rawMemory, size_t size) { \
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
19 free(rawMemory); \
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
20 } \
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
21
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
22 #else
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
23 # define BASE_NEW_DELETE(T)
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
24 #endif
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
25