physical.cc (8794:e2ac2b7164dd) physical.cc (8796:a2ae5c378d0a)
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

--- 542 unchanged lines hidden (view full) ---

551
552 // unmap file that was mmapped in the constructor
553 // This is done here to make sure that gzip and open don't muck with our
554 // nice large space of memory before we reallocate it
555 munmap((char*)pmemAddr, size());
556
557 UNSERIALIZE_SCALAR(_size);
558 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

--- 542 unchanged lines hidden (view full) ---

551
552 // unmap file that was mmapped in the constructor
553 // This is done here to make sure that gzip and open don't muck with our
554 // nice large space of memory before we reallocate it
555 munmap((char*)pmemAddr, size());
556
557 UNSERIALIZE_SCALAR(_size);
558 if (size() > params()->range.size())
559 fatal("Memory size has changed!\n");
559 fatal("Memory size has changed! size %lld, param size %lld\n",
560 size(), params()->range.size());
560
561 pmemAddr = (uint8_t *)mmap(NULL, size(),
562 PROT_READ | PROT_WRITE, MAP_ANON | MAP_PRIVATE, -1, 0);
563
564 if (pmemAddr == (void *)MAP_FAILED) {
565 perror("mmap");
566 fatal("Could not mmap physical memory!\n");
567 }

--- 43 unchanged lines hidden ---
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 ---