|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.android.ddmlib.HeapSegment
public final class HeapSegment
Describes the types and locations of objects in a segment of a heap.
| Nested Class Summary | |
|---|---|
static class |
HeapSegment.HeapSegmentElement
Describes an object/region encoded in the HPSG data. |
| Field Summary | |
|---|---|
protected int |
mAllocationUnitCount
|
protected int |
mAllocationUnitSize
|
protected int |
mHeapId
|
protected int |
mOffset
|
protected long |
mStartAddress
|
protected java.nio.ByteBuffer |
mUsageData
|
| Constructor Summary | |
|---|---|
HeapSegment(java.nio.ByteBuffer hpsgData)
Create a new HeapSegment based on the raw contents of an HPSG chunk. |
|
| Method Summary | |
|---|---|
boolean |
append(HeapSegment other)
Append the contents of other to this segment
if it describes the segment immediately after this one. |
boolean |
canAppend(HeapSegment other)
See if other comes immediately after this segment. |
int |
compareTo(HeapSegment other)
|
boolean |
equals(java.lang.Object o)
|
long |
getEndAddress()
|
int |
getLength()
|
HeapSegment.HeapSegmentElement |
getNextElement(HeapSegment.HeapSegmentElement reuse)
|
long |
getStartAddress()
|
int |
hashCode()
|
boolean |
isValid()
See if this segment still contains data, and has not been appended to another segment. |
void |
rewindElements()
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected int mHeapId
protected int mAllocationUnitSize
protected long mStartAddress
protected int mOffset
protected int mAllocationUnitCount
protected java.nio.ByteBuffer mUsageData
| Constructor Detail |
|---|
public HeapSegment(java.nio.ByteBuffer hpsgData)
throws java.nio.BufferUnderflowException
hpsgData - The raw data from an HPSG chunk.
java.nio.BufferUnderflowException - if hpsgData is too small
to hold the HPSG chunk header data.| Method Detail |
|---|
public boolean isValid()
public boolean canAppend(HeapSegment other)
other comes immediately after this segment.
other - The HeapSegment to check.
other comes immediately after this
segment.public boolean append(HeapSegment other)
other to this segment
if it describes the segment immediately after this one.
other - The segment to append to this segment, if possible.
If appended, other will be invalid
when this method returns.
other was successfully appended to
this segment.public long getStartAddress()
public int getLength()
public long getEndAddress()
public void rewindElements()
public HeapSegment.HeapSegmentElement getNextElement(HeapSegment.HeapSegmentElement reuse)
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic int compareTo(HeapSegment other)
compareTo in interface java.lang.Comparable<HeapSegment>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||