Mercurial > hg > Game > Cerium
view TaskManager/include/base.h @ 596:f1c2e11a2ef4 draft
add xdr_getpos
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 04 Nov 2009 22:52:06 +0900 |
parents | 0251d06467de |
children | 94d82f2c842f |
line wrap: on
line source
#ifndef INCLUDED_BASE_H_ #include <new> #include <stdlib.h> #include <stdio.h> #ifdef __SPU__ //#if 0 # 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