Changeset 431 for soft/giet_vm/giet_libs/remote_malloc.c
- Timestamp:
- Oct 4, 2014, 3:35:35 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_libs/remote_malloc.c
r375 r431 41 41 if ( align > 31 ) 42 42 { 43 giet_exit(" in remote_malloc(), align constraint > 31\n");43 giet_exit(" in remote_malloc(), align constraint > 31\n"); 44 44 } 45 45 … … 47 47 if ( length == 0 ) 48 48 { 49 giet_exit(" in remote_malloc(), requested length = 0\n");49 giet_exit(" in remote_malloc(), requested length = 0\n"); 50 50 } 51 51 52 #if GIET_DEBUG_MALLOC 53 unsigned int procid = giet_procid(); 54 unsigned int cluster = procid / NB_PROCS_MAX; 52 unsigned int gpid = giet_procid(); 53 unsigned int cluster = gpid >> P_WIDTH; 55 54 unsigned int proc_x = cluster >> Y_WIDTH; 56 55 unsigned int proc_y = cluster & ((1<<Y_WIDTH)-1); 57 unsigned int lpid = procid % NB_PROCS_MAX; 56 unsigned int lpid = gpid & ((1<<P_WIDTH)-1); 57 58 #if GIET_DEBUG_MALLOC 58 59 giet_shr_printf("\n[DEBUG MALLOC] Processor[%d,%d,%d] enters remote_malloc()" 59 60 " : length = %x / align = %x for heap(%d,%d)\n", … … 78 79 else 79 80 { 80 unsigned int pid = giet_procid(); 81 heap_x = (pid / NB_PROCS_MAX) >> Y_WIDTH; 82 heap_y = (pid / NB_PROCS_MAX) & ((1<<Y_WIDTH)-1); 81 heap_x = proc_x; 82 heap_y = proc_y; 83 83 } 84 84
Note: See TracChangeset
for help on using the changeset viewer.