自 2026 年起,为了与我们的主干稳定开发模型保持一致,并确保生态系统的平台稳定性,我们将在第 2 季度和第 4 季度将源代码发布到 AOSP。对于构建 AOSP 和向 AOSP 贡献代码,我们建议使用 android-latest-release 而不是 aosp-main。android-latest-release 清单分支将始终引用推送到 AOSP 的最新版本。如需了解详情,请参阅 AOSP 变更。
Google uses AI technology to translate content into your preferred language. AI translations can contain errors.
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
HeapSegment
public
final
class
HeapSegment
extends Object
| java.lang.Object
|
| ↳ |
com.android.tradefed.device.server.HeapSegment
|
描述堆内存段中对象的类型和位置。
摘要
公共构造函数 |
HeapSegment(ByteBuffer hpsgData)
根据 HPSG chunk 的原始内容创建新的 HeapSegment。
|
字段
mAllocationUnitCount
protected int mAllocationUnitCount
mAllocationUnitSize
protected int mAllocationUnitSize
mHeapId
protected int mHeapId
mOffset
protected int mOffset
mStartAddress
protected long mStartAddress
mUsageData
protected ByteBuffer mUsageData
公共构造函数
HeapSegment
public HeapSegment (ByteBuffer hpsgData)
基于 HPSG chunk 的原始内容创建新的 HeapSegment。
| 参数 |
hpsgData |
ByteBuffer:来自 HPSG 块的原始数据。 |
| 抛出 |
|
如果 hpsgData 太小而无法容纳 HPSG 块头数据。 |
公共方法
附加
public boolean append (HeapSegment other)
如果 other 描述的是紧随此段落之后的段落,则将 other 的内容附加到此段落。
| 参数 |
other |
HeapSegment:要附加到此细分受众群的细分受众群(如果可能)。如果附加了此参数,则当此方法返回时,other
将无效。 |
| 返回 |
boolean |
如果成功将 other 附加到此段,则为 true。 |
canAppend
public boolean canAppend (HeapSegment other)
查看 other 是否紧跟在此段之后。
| 参数 |
other |
HeapSegment:要检查的 HeapSegment。 |
| 返回 |
boolean |
如果 other 紧跟在此段之后,则为 true。 |
等号
public boolean equals (Object o)
getEndAddress
public long getEndAddress ()
getLength
public int getLength ()
getStartAddress
public long getStartAddress ()
hashCode
public int hashCode ()
isValid
public boolean isValid ()
查看此细分受众群是否仍包含数据,以及是否已附加到其他细分受众群。
| 返回 |
boolean |
如果相应细分尚未附加到其他细分,则为 true。 |
rewindElements
public void rewindElements ()
toString
public String toString ()
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-12-04。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-12-04。"],[],[]]