diff TaskManager/Fifo/MainScheduler.cc @ 629:8843edf37c0e

Cell 64 bit tried, but not yet worked. Cell's list DMA is 32bit.
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Wed, 18 Nov 2009 13:32:58 +0900
parents f64d75473f95
children 8cc609285bbe
line wrap: on
line diff
--- a/TaskManager/Fifo/MainScheduler.cc	Tue Nov 17 01:35:12 2009 +0900
+++ b/TaskManager/Fifo/MainScheduler.cc	Wed Nov 18 13:32:58 2009 +0900
@@ -41,8 +41,12 @@
 void*
 MainScheduler::allocate(int size)
 {
+#ifdef HAS_POSIX_MEMALIGN
+    void *ptr;
+    posix_memalign(&ptr,SPE_ALIGNMENT_FULL, size);
+#else
     void *ptr = malloc(size);
-    bzero(ptr, size);
+#endif
 
     return ptr;
 }
@@ -55,7 +59,7 @@
 void
 MainScheduler::mainMem_alloc(int id, int size)
 {
-    mainMemList[id] = allocate(size);
+    mainMemList[id] = (memaddr)allocate(size);
 }
 
 #if 0