Skip to content

Commit 07f7a2e

Browse files
authored
Revert "Feature/use less memory"
1 parent 2ff8340 commit 07f7a2e

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

volatility3/framework/interfaces/objects.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import collections.abc
99
import contextlib
1010
import logging
11-
from typing import Any, List, Mapping, Optional
11+
from typing import Any, Dict, List, Mapping, Optional
1212

1313
from volatility3.framework import constants, interfaces
1414

@@ -127,11 +127,8 @@ def __init__(
127127
mask = context.layers[object_info.layer_name].address_mask
128128
normalized_offset = object_info.offset & mask
129129

130-
vol = kwargs
131130
vol_info_dict = {"type_name": type_name, "offset": normalized_offset}
132-
vol.update(object_info)
133-
vol.update(vol_info_dict)
134-
self._vol = collections.ChainMap({}, vol)
131+
self._vol = collections.ChainMap({}, vol_info_dict, object_info, kwargs)
135132
self._context = context
136133

137134
def __getattr__(self, attr: str) -> Any:
@@ -312,9 +309,10 @@ def __init__(self, type_name: str, **arguments) -> None:
312309
"""Stores the keyword arguments for later object creation."""
313310
# Allow the updating of template arguments whilst still in template form
314311
super().__init__()
315-
vol = {"type_name": type_name}
316-
vol.update(arguments)
317-
self._vol = collections.ChainMap({}, vol)
312+
empty_dict: Dict[str, Any] = {}
313+
self._vol = collections.ChainMap(
314+
empty_dict, arguments, {"type_name": type_name}
315+
)
318316

319317
@property
320318
def vol(self) -> ReadOnlyMapping:

0 commit comments

Comments
 (0)