Class MemoryRanges
java.lang.Object
com.pnfsoftware.jeb.core.units.code.asm.analyzer.MemoryRanges
A collection of byte-addressable memory ranges. The final addressable byte (e.g., @ 0xFFFFFFFF in a
32-bit address space) cannot be part of any range.
This class is not thread-safe.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(long begin0, long end0) longasList()voidclear()booleancontains(long address) Indicate if an address is defined in thisMemoryRangesintcount()getLocalBegin(long address0) getLocalEnd(long address0) getLocalRange(long address0) getNextRange(long address0) getPreviousRange(long address0) booleanintersects(long addressStart, long addressEnd) Indicate if an element from range [addressStart:addressEnd[ is defined in thisMemoryRanges.max()min()voidremove(long begin0, long end0) longspanSize()toString()
-
Constructor Details
-
MemoryRanges
public MemoryRanges(int spaceBits) -
MemoryRanges
public MemoryRanges() -
MemoryRanges
-
-
Method Details
-
add
public void add(long begin0, long end0) -
remove
public void remove(long begin0, long end0) -
clear
public void clear() -
min
-
max
-
count
public int count() -
asList
- Returns:
- the list of
MemoryRanges
-
contains
public boolean contains(long address) Indicate if an address is defined in thisMemoryRanges- Parameters:
address- address to test- Returns:
- true if
MemoryRangescontains this address
-
intersects
public boolean intersects(long addressStart, long addressEnd) Indicate if an element from range [addressStart:addressEnd[ is defined in thisMemoryRanges.- Parameters:
addressStart- start address (inclusive)addressEnd- end address (exclusive)- Returns:
- true if
MemoryRangescontains at least one address from the given range
-
getLocalBegin
-
getLocalEnd
-
getNextRange
-
getPreviousRange
-
getLocalRange
-
spanSize
public long spanSize() -
aggregatedRangesSize
public long aggregatedRangesSize() -
toString
-