view include/TaskManager/base.h @ 350:628cb162be88 draft

add tasts.xml renderer.xml
author admin@mcbk.cr.ie.u-ryukyu.ac.jp
date Fri, 10 Jul 2009 16:41:20 +0900
parents 7f991471d43f
children
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