physical.cc (11614:29606f000389) physical.cc (11793:ef606668d247)
1/*
2 * Copyright (c) 2012, 2014 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

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

32 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
35 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 *
37 * Authors: Andreas Hansson
38 */
39
1/*
2 * Copyright (c) 2012, 2014 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

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

32 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
35 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 *
37 * Authors: Andreas Hansson
38 */
39
40#include "mem/physical.hh"
41
42#include <fcntl.h>
40#include <sys/mman.h>
41#include <sys/types.h>
42#include <sys/user.h>
43#include <sys/mman.h>
44#include <sys/types.h>
45#include <sys/user.h>
43#include <fcntl.h>
44#include <unistd.h>
45#include <zlib.h>
46
47#include <cerrno>
48#include <climits>
49#include <cstdio>
50#include <iostream>
51#include <string>
52
53#include "base/trace.hh"
54#include "debug/AddrRanges.hh"
55#include "debug/Checkpoint.hh"
56#include "mem/abstract_mem.hh"
46#include <unistd.h>
47#include <zlib.h>
48
49#include <cerrno>
50#include <climits>
51#include <cstdio>
52#include <iostream>
53#include <string>
54
55#include "base/trace.hh"
56#include "debug/AddrRanges.hh"
57#include "debug/Checkpoint.hh"
58#include "mem/abstract_mem.hh"
57#include "mem/physical.hh"
58
59/**
60 * On Linux, MAP_NORESERVE allow us to simulate a very large memory
61 * without committing to actually providing the swap space on the
62 * host. On FreeBSD or OSX the MAP_NORESERVE flag does not exist,
63 * so simply make it 0.
64 */
65#if defined(__APPLE__) || defined(__FreeBSD__)

--- 416 unchanged lines hidden ---
59
60/**
61 * On Linux, MAP_NORESERVE allow us to simulate a very large memory
62 * without committing to actually providing the swap space on the
63 * host. On FreeBSD or OSX the MAP_NORESERVE flag does not exist,
64 * so simply make it 0.
65 */
66#if defined(__APPLE__) || defined(__FreeBSD__)

--- 416 unchanged lines hidden ---