Pagecache: Add comments explaining cast

Adds a couple of comments explaining why we're doing a lossy conversion
to Python `int` (saving memory).
This commit is contained in:
David McDonald
2025-04-14 18:25:17 -05:00
parent c641690c53
commit 9ceec51b76
@@ -283,6 +283,10 @@ class Files(plugins.PluginInterface, timeliner.TimeLinerInterface):
continue
# Inode already processed?
# Store a primitive int (instead of the pointer value) to track
# addresses we've already seen. Storing the full `objects.Pointer`
# uses too much memory, and we don't need all of the information
# that it contains.
if int(root_inode_ptr) in seen_inodes:
continue
@@ -319,6 +323,10 @@ class Files(plugins.PluginInterface, timeliner.TimeLinerInterface):
continue
# Inode already processed?
# Store a primitive int (instead of the pointer value) to track
# addresses we've already seen. Storing the full `objects.Pointer`
# uses too much memory, and we don't need all of the information
# that it contains.
if int(file_inode_ptr) in seen_inodes:
continue
seen_inodes.add(int(file_inode_ptr))