Changeset 187 for soft/giet_vm/memo/src
- Timestamp:
- Jul 30, 2012, 6:14:22 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/memo/src/memo.cpp
r173 r187 39 39 #include "memo.h" 40 40 41 //#define MOVER_DEBUG 41 //#define MOVER_DEBUG 42 42 43 43 MeMo::MeMo( const std::string &filename, … … 203 203 // various mapping_info data structure access functions 204 204 ///////////////////////////////////////////////////////////////////////////// 205 205 mapping_cluster_t* MeMo::get_cluster_base( mapping_header_t* header ) 206 { 207 return (mapping_cluster_t*) ((char*)header + 208 MAPPING_HEADER_SIZE); 209 } 206 210 ///////////////////////////////////////////////////////////////////////////// 207 211 mapping_pseg_t* MeMo::get_pseg_base( mapping_header_t* header ) … … 332 336 } // end print_mapping_info() 333 337 334 //////////////////////////////////////////335 void MeMo::pseg_map( mapping_pseg_t* pseg)336 {337 std::string name(pseg->name);338 m_psegh.m_pSegs.push_back(PSeg(name, pseg->base, pseg->length));339 }340 341 338 342 339 ////////////////////////////////////////// … … 536 533 mapping_header_t* header = (mapping_header_t*)desc; 537 534 535 mapping_cluster_t* cluster = get_cluster_base( header ); 538 536 mapping_vspace_t* vspace = get_vspace_base( header ); 539 537 mapping_pseg_t* pseg = get_pseg_base( header ); … … 546 544 #endif 547 545 548 for ( size_t pseg_id = 0 ; pseg_id < header->psegs ; pseg_id++ ) 549 { 550 pseg_map( &pseg[pseg_id]); 546 #ifdef DISTRIBUTED_SCHEDULERS 547 char found; 548 #endif 549 550 for ( size_t cluster_id = 0 ; cluster_id < header->clusters ; cluster_id++ ) 551 { 552 553 #ifdef DISTRIBUTED_SCHEDULERS 554 found = 0; 555 #endif 556 557 for ( size_t pseg_id = cluster[cluster_id].pseg_offset ; 558 pseg_id < cluster[cluster_id].pseg_offset + cluster[cluster_id].psegs ; 559 pseg_id++ ) 560 { 561 //build pseg 562 std::string name(pseg[pseg_id].name); 563 PSeg *ps = new PSeg(name, pseg[pseg_id].base, pseg[pseg_id].length); 564 565 #ifdef DISTRIBUTED_SCHEDULERS 566 if ( (pseg[pseg_id].type == PSEG_TYPE_RAM) && (found == 0) ) 567 { 568 ps->incNextLma( (cluster[cluster_id].procs << 12) ); 569 found = 1; 570 } 571 #endif 572 m_psegh.m_pSegs.push_back(*ps); 573 574 } 551 575 } 552 576
Note: See TracChangeset
for help on using the changeset viewer.