Skip to content

Commit

Permalink
definately didn't expect this
Browse files Browse the repository at this point in the history
  • Loading branch information
DennyDai committed Jun 29, 2024
1 parent be9f816 commit 98d1482
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def _create_new_mapped_block(
for block in self.blocks[FileBlock]:
if block.size == -1:
file_addr = block.addr
block.addr += 0x2000
block.addr += 0x10000
for block in self.blocks[MemoryBlock]:
if block.size == -1:
# NOTE: mem_addr % p_align should equal to file_addr % p_align
Expand All @@ -177,13 +177,13 @@ def _create_new_mapped_block(
mem_addr = block.addr + (file_addr % max_seg_align)
else:
mem_addr = block.addr + (file_addr % 0x1000)
block.addr = mem_addr + 0x2000
block.addr = mem_addr + 0x10000
if file_addr and mem_addr:
self.add_block(
MappedBlock(file_addr, mem_addr, 0x2000, is_free=True, flag=flag)
MappedBlock(file_addr, mem_addr, 0x10000, is_free=True, flag=flag)
)
self.new_mapped_blocks.append(
MappedBlock(file_addr, mem_addr, 0x2000, is_free=True, flag=flag)
MappedBlock(file_addr, mem_addr, 0x10000, is_free=True, flag=flag)
)
return True
return False
Expand Down

0 comments on commit 98d1482

Please sign in to comment.