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 TypeMethodDescriptionvoid
add
(long begin0, long end0) long
asList()
void
clear()
boolean
contains
(long address) Indicate if an address is defined in thisMemoryRanges
int
count()
getLocalBegin
(long address0) getLocalEnd
(long address0) getLocalRange
(long address0) getNextRange
(long address0) getPreviousRange
(long address0) boolean
intersects
(long addressStart, long addressEnd) Indicate if an element from range [addressStart:addressEnd[ is defined in thisMemoryRanges
.max()
min()
void
remove
(long begin0, long end0) long
spanSize()
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
MemoryRanges
contains 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
MemoryRanges
contains at least one address from the given range
-
getLocalBegin
-
getLocalEnd
-
getNextRange
-
getPreviousRange
-
getLocalRange
-
spanSize
public long spanSize() -
aggregatedRangesSize
public long aggregatedRangesSize() -
toString
-