您的位置:首页 > 其它

spark core 2.0 MemoryLocation

2017-01-22 10:25 162 查看
MemoryLocation is tracked either by a memory address( with off-heap allocation), or by an offset from a JVM objet(in-heap allocation).

public class MemoryLocation {

@Nullable
Object obj;

long offset;

public MemoryLocation(@Nullable Object obj, long offset) {
this.obj = obj;
this.offset = offset;
}

public MemoryLocation() {
this(null, 0);
}

public void setObjAndOffset(Object newObj, long newOffset) {
this.obj = newObj;
this.offset = newOffset;
}

public final Object getBaseObject() {
return obj;
}

public final long getBaseOffset() {
return offset;
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: