physical.cc (8340:e39a9c0493ad) | physical.cc (8636:4ee9dec30f8c) |
---|---|
1/* 2 * Copyright (c) 2010 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 543 unchanged lines hidden (view full) --- 552 553 // unmap file that was mmapped in the constructor 554 // This is done here to make sure that gzip and open don't muck with our 555 // nice large space of memory before we reallocate it 556 munmap((char*)pmemAddr, size()); 557 558 UNSERIALIZE_SCALAR(_size); 559 if (size() > params()->range.size()) | 1/* 2 * Copyright (c) 2010 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 543 unchanged lines hidden (view full) --- 552 553 // unmap file that was mmapped in the constructor 554 // This is done here to make sure that gzip and open don't muck with our 555 // nice large space of memory before we reallocate it 556 munmap((char*)pmemAddr, size()); 557 558 UNSERIALIZE_SCALAR(_size); 559 if (size() > params()->range.size()) |
560 fatal("Memory size has changed!\n"); | 560 fatal("Memory size has changed! size %lld, param size %lld\n", 561 size(), params()->range.size()); |
561 562 pmemAddr = (uint8_t *)mmap(NULL, size(), 563 PROT_READ | PROT_WRITE, MAP_ANON | MAP_PRIVATE, -1, 0); 564 565 if (pmemAddr == (void *)MAP_FAILED) { 566 perror("mmap"); 567 fatal("Could not mmap physical memory!\n"); 568 } --- 43 unchanged lines hidden --- | 562 563 pmemAddr = (uint8_t *)mmap(NULL, size(), 564 PROT_READ | PROT_WRITE, MAP_ANON | MAP_PRIVATE, -1, 0); 565 566 if (pmemAddr == (void *)MAP_FAILED) { 567 perror("mmap"); 568 fatal("Could not mmap physical memory!\n"); 569 } --- 43 unchanged lines hidden --- |