Changeset 777 for soft/giet_vm/giet_libs/malloc.c
- Timestamp:
- Feb 4, 2016, 6:25:22 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_libs/malloc.c
r709 r777 8 8 #include "malloc.h" 9 9 #include "stdio.h" 10 #include "stdlib.h" 10 11 #include "giet_config.h" 11 12 … … 214 215 215 216 //////////////////////////////////////// 216 void * remote_malloc( unsignedint size,217 void * remote_malloc( int size, 217 218 unsigned int x, 218 219 unsigned int y ) … … 278 279 #endif 279 280 280 return (void*) base;281 return (void*) base; 281 282 282 283 } // end remote_malloc() … … 284 285 285 286 ////////////////////////////////// 286 void * malloc( unsignedint size )287 void * malloc( int size ) 287 288 { 288 289 // get cluster coordinates 289 unsigned int 290 unsigned int 291 unsigned int 290 unsigned int x; 291 unsigned int y; 292 unsigned int lpid; 292 293 giet_proc_xyp( &x, &y, &lpid ); 293 294 294 295 return remote_malloc( size, x, y ); 295 296 } 297 298 299 //////////////////////////////////// 300 void * calloc ( int nbmem, int size ) 301 { 302 void * a = malloc( nbmem * size ); 303 memset( a, 0, nbmem * size ); 304 return a; 305 } 296 306 297 307 ///////////////////////////////////////////
Note: See TracChangeset
for help on using the changeset viewer.