Пример #1
0
func (r *Packed8ThreeBlocks) RamBytesUsed() int64 {
	return util.AlignObjectSize(
		util.NUM_BYTES_OBJECT_HEADER +
			2*util.NUM_BYTES_INT +
			util.NUM_BYTES_OBJECT_REF +
			util.SizeOf(r.blocks))
}
Пример #2
0
func (d *Direct32) RamBytesUsed() int64 {
	return util.AlignObjectSize(
		util.NUM_BYTES_OBJECT_HEADER +
			2*util.NUM_BYTES_INT +
			util.NUM_BYTES_OBJECT_REF +
			util.SizeOf(d.values))
}
Пример #3
0
func (p *Packed64SingleBlock) RamBytesUsed() int64 {
	return util.AlignObjectSize(
		util.NUM_BYTES_OBJECT_HEADER +
			2*util.NUM_BYTES_INT +
			util.NUM_BYTES_OBJECT_REF +
			util.SizeOf(p.blocks))
}
Пример #4
0
func (w *GrowableWriter) RamBytesUsed() int64 {
	return util.AlignObjectSize(
		util.NUM_BYTES_OBJECT_HEADER+
			util.NUM_BYTES_OBJECT_REF+
			util.NUM_BYTES_LONG+
			util.NUM_BYTES_FLOAT) +
		w.current.RamBytesUsed()
}
Пример #5
0
func (r *NilReader) RamBytesUsed() int64 {
	return util.AlignObjectSize(util.NUM_BYTES_OBJECT_HEADER + util.NUM_BYTES_INT)
}