Skip to content

Commit 7dc2e97

Browse files
committed
Remove method that is no longer used
1 parent 7c1580e commit 7dc2e97

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

qiling/os/memory.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -444,25 +444,6 @@ def is_mapped(self, addr: int, size: int) -> bool:
444444

445445
return not self.is_available(addr, size)
446446

447-
def is_free(self, address, size):
448-
'''
449-
The main function of is_free first must fufull is_mapped condition.
450-
then, check for is the mapped range empty, either fill with 0xFF or 0x00
451-
Returns true if mapped range is empty else return Flase
452-
If not not mapped, map it and return true
453-
'''
454-
if self.is_mapped(address, size) == True:
455-
address_end = (address + size)
456-
while address < address_end:
457-
mem_read = self.ql.mem.read(address, 0x1)
458-
if (mem_read[0] != 0x00) and (mem_read[0] != 0xFF):
459-
return False
460-
address += 1
461-
return True
462-
else:
463-
return True
464-
465-
466447
def find_free_space(self, size: int, minaddr: int = None, maxaddr: int = None, align: int = None) -> int:
467448
"""Locate an unallocated memory that is large enough to contain a range in size of
468449
`size` and based at `minaddr`.

0 commit comments

Comments
 (0)