Skip to content

Commit 9ceec51

Browse files
committed
Pagecache: Add comments explaining cast
Adds a couple of comments explaining why we're doing a lossy conversion to Python `int` (saving memory).
1 parent c641690 commit 9ceec51

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

volatility3/framework/plugins/linux/pagecache.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,10 @@ def get_inodes(
283283
continue
284284

285285
# Inode already processed?
286+
# Store a primitive int (instead of the pointer value) to track
287+
# addresses we've already seen. Storing the full `objects.Pointer`
288+
# uses too much memory, and we don't need all of the information
289+
# that it contains.
286290
if int(root_inode_ptr) in seen_inodes:
287291
continue
288292

@@ -319,6 +323,10 @@ def get_inodes(
319323
continue
320324

321325
# Inode already processed?
326+
# Store a primitive int (instead of the pointer value) to track
327+
# addresses we've already seen. Storing the full `objects.Pointer`
328+
# uses too much memory, and we don't need all of the information
329+
# that it contains.
322330
if int(file_inode_ptr) in seen_inodes:
323331
continue
324332
seen_inodes.add(int(file_inode_ptr))

0 commit comments

Comments
 (0)