Example #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))
}
Example #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))
}
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))
}
Example #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()
}
Example #5
0
func (r *NilReader) RamBytesUsed() int64 {
	return util.AlignObjectSize(util.NUM_BYTES_OBJECT_HEADER + util.NUM_BYTES_INT)
}