Commit 907a9c3 1 parent d0b50a2 commit 907a9c3 Copy full SHA for 907a9c3
File tree 1 file changed +1
-13
lines changed
1 file changed +1
-13
lines changed Original file line number Diff line number Diff line change 12
12
import struct
13
13
import zlib
14
14
15
- try :
16
- import resource
17
- PAGESIZE = resource .getpagesize ()
18
- except ImportError :
19
- try :
20
- # Windows system
21
- import mmap
22
- PAGESIZE = mmap .PAGESIZE
23
- except ImportError :
24
- # Jython
25
- PAGESIZE = 4096
26
-
27
15
from ..common .exceptions import ELFError , ELFParseError
28
16
from ..common .utils import struct_parse , elf_assert
29
17
from .structs import ELFStructs
@@ -857,7 +845,7 @@ def _decompress_dwarf_section(section):
857
845
decompressor = zlib .decompressobj ()
858
846
uncompressed_stream = BytesIO ()
859
847
while True :
860
- chunk = section .stream .read (PAGESIZE )
848
+ chunk = section .stream .read (4096 )
861
849
if not chunk :
862
850
break
863
851
uncompressed_stream .write (decompressor .decompress (chunk ))
You can’t perform that action at this time.
0 commit comments