-
Notifications
You must be signed in to change notification settings - Fork 2
/
MemoryRegion.cpp
52 lines (44 loc) · 1.32 KB
/
MemoryRegion.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/*
* MemoryRegion.cpp
*
* Created on: Nov 20, 2013
* Author: tyler
*/
#include "MemoryRegion.h"
MemoryRegion::MemoryRegion(intptr_t startPtr, intptr_t endPtr, intptr_t fileOffset,
const Flags<ProtectionFlags>& flags, const std::string& name):
m_startPtr(startPtr), m_endPtr(endPtr), m_fileOffset(fileOffset),
m_protectionFlags(flags), m_name(name)
{
}
MemoryRegion::~MemoryRegion()
{
}
MemoryRegion::MemoryRegion(const MemoryRegion& other):
m_startPtr(other.m_startPtr), m_endPtr(other.m_endPtr), m_fileOffset(other.m_fileOffset),
m_protectionFlags(other.m_protectionFlags), m_name(other.m_name)
{
}
MemoryRegion::MemoryRegion(MemoryRegion&& other):
m_startPtr(other.m_startPtr), m_endPtr(other.m_endPtr), m_fileOffset(other.m_fileOffset),
m_protectionFlags(other.m_protectionFlags), m_name(std::move(other.m_name))
{
}
MemoryRegion& MemoryRegion::operator =(const MemoryRegion& other)
{
m_startPtr = other.m_startPtr;
m_endPtr = other.m_endPtr;
m_fileOffset = other.m_fileOffset;
m_protectionFlags = other.m_protectionFlags;
m_name = other.m_name;
return *this;
}
MemoryRegion& MemoryRegion::operator =(MemoryRegion&& other)
{
m_startPtr = other.m_startPtr;
m_endPtr = other.m_endPtr;
m_fileOffset = other.m_fileOffset;
m_protectionFlags = other.m_protectionFlags;
m_name = std::move(other.m_name);
return *this;
}