Mercurial > hg > Members > kono > Cerium
view 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 |
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