Mercurial > hg > Game > Cerium
view TaskManager/include/base.h @ 868:08ed5e750d78 draft
[aquarium]: update screen scope on linda with protobuf
author | kazz <kazz@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 22 Jun 2010 16:10:28 +0900 |
parents | 94d82f2c842f |
children |
line wrap: on
line source
#ifndef INCLUDED_BASE_H_ #include <new> #include <stdlib.h> #include <stdio.h> #ifdef __SPU__ # define BASE_NEW_DELETE(T) \ /* override new/detele */ \ static void* operator new(size_t size) { \ if ((int)size == 0) { \ size = 1; \ } \ \ void *ptr = malloc(size); \ return ptr; \ } \ static void operator delete(void* rawMemory, size_t size) { \ free(rawMemory); \ } \ #else # define BASE_NEW_DELETE(T) #endif #endif