-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProcess.cpp
More file actions
42 lines (32 loc) · 860 Bytes
/
Copy pathProcess.cpp
File metadata and controls
42 lines (32 loc) · 860 Bytes
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
//Kyrylo Glamazdin
//CSCI 340
#include "Process.hpp"
/* CONSTRUCTOR */
Process::Process(int PID, long long process_size, ProcessType pt){
PID_ = PID;
size_ = process_size;
pt_ = pt;
starting_memory_location_ = -1;
ending_memory_location_ = -1;
}
/* MUTATOR METHODS */
void Process::setMemoryLocation(const long long start, const long long end){
starting_memory_location_ = start;
ending_memory_location_ = end;
}
/* ACCESSOR METHODS */
pair<long long, long long> Process::getMemoryLocation() const{
pair<long long, long long> mem_loc;
mem_loc.first = starting_memory_location_;
mem_loc.second = ending_memory_location_;
return mem_loc;
}
int Process::getPID() const{
return PID_;
}
long long Process::getSize() const{
return size_;
}
bool Process::isRegular() const{
return (pt_ == regular);
}