Mercurial > hg > Members > kono > Cerium
annotate include/TaskManager/base.h @ 311:b09784a9cb09
add smanager interface for test_nogl
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 08 Jun 2009 22:35:44 +0900 |
parents | bcb81858aa62 |
children |
rev | line source |
---|---|
301
bcb81858aa62
remove deprecated source. not work.
tkaito@localhost.localdomain
parents:
193
diff
changeset
|
1 #ifndef INCLUDED_BASE_H_ |
bcb81858aa62
remove deprecated source. not work.
tkaito@localhost.localdomain
parents:
193
diff
changeset
|
2 |
109 | 3 #include <new> |
4 #include <stdlib.h> | |
5 #include <stdio.h> | |
6 | |
7 | |
193 | 8 #ifdef __SPU__ |
9 //#if 0 | |
109 | 10 # define BASE_NEW_DELETE(T) \ |
11 /* override new/detele */ \ | |
12 static void* operator new(size_t size) { \ | |
13 if ((int)size == 0) { \ | |
14 size = 1; \ | |
15 } \ | |
16 \ | |
17 void *ptr = malloc(size); \ | |
18 return ptr; \ | |
19 } \ | |
20 static void operator delete(void* rawMemory, size_t size) { \ | |
21 free(rawMemory); \ | |
22 } \ | |
23 | |
24 #else | |
25 # define BASE_NEW_DELETE(T) | |
26 #endif | |
27 | |
301
bcb81858aa62
remove deprecated source. not work.
tkaito@localhost.localdomain
parents:
193
diff
changeset
|
28 #endif |