comparison TaskManager/Fifo/FifoTaskManagerImpl.cc @ 538:5641d121818e draft

code_load in read()
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 12 Oct 2009 02:50:01 +0900
parents 981aa2f89a80
children 92b0d490e839
comparison
equal deleted inserted replaced
505:053da4e2e8bf 538:5641d121818e
231 mailManager->free(d); 231 mailManager->free(d);
232 } 232 }
233 } 233 }
234 234
235 void* 235 void*
236 FifoTaskManagerImpl::allocate(int size, int alignment)
237 {
238 #ifdef __APPLE__
239 return malloc(size);
240 #else
241 void *buff;
242 posix_memalign(&buff, alignment, size);
243 return buff;
244 #endif
245 }
246
247 void*
236 FifoTaskManagerImpl::allocate(int size) 248 FifoTaskManagerImpl::allocate(int size)
237 { 249 {
250 #ifdef __APPLE__
238 return malloc(size); 251 return malloc(size);
252 #else
253 void *buff;
254 posix_memalign(&buff, DEFAULT_ALIGNMENT, size);
255 return buff;
256 #endif
239 } 257 }
240 258
241 Scheduler* 259 Scheduler*
242 FifoTaskManagerImpl::get_scheduler() { 260 FifoTaskManagerImpl::get_scheduler() {
243 return scheduler; 261 return scheduler;