Skip to content

Commit

Permalink
crit: add getter for pagesID field in MemoryReader struct
Browse files Browse the repository at this point in the history
This commit introduces a new getter function that allows accessing
the value of the pagesID field within the MemoryReader struct.
This getter function will be beneficial for enabling checkpointctl
to extract only the required page image files efficiently.

Signed-off-by: Kouame Behouba Manasse <behouba@gmail.com>
  • Loading branch information
behouba committed Aug 1, 2023
1 parent 613fd74 commit 7fb2b53
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crit/mempages.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ type MemoryReader struct {
pagemapEntries []*pagemap.PagemapEntry
}

func (mr *MemoryReader) GetPagesID() uint32 {
return mr.pagesID
}

// NewMemoryReader creates a new instance of MemoryReader with all the fields populated
func NewMemoryReader(checkpointDir string, pid uint32, pageSize int) (*MemoryReader, error) {
if pageSize == 0 {
Expand Down

0 comments on commit 7fb2b53

Please sign in to comment.