func (v *Val_t) GetInt() int {
	return int(binary.LittleEndian.Uint64((*v)[:8]))
}
GetInt gets an int value for Val_t v.
package offheap
import (
	"encoding/binary"
	"fmt"
	"unsafe"
)
const MetadataHeaderMaxBytes = 4096
type HashTable struct {
	MagicNumber   int      
	Cells         uintptr `msg:"-"`
	CellSz        uint64
	ArraySize     uint64
	Population    uint64
	ZeroUsed      bool
	ZeroCell      Cell
	OffheapHeader []byte     `msg:"-"`
	OffheapCells  []byte     `msg:"-"`
	Mmm           MmapMalloc `msg:"-"`
}
func NewHashTable(initialSize int64) *HashTable {
	return NewHashFileBacked(initialSize, "")
}
func NewHashFileBacked(initialSize int64, filepath string) *HashTable {
	t := HashTable{
		MagicNumber: 3030675468910466832,
		CellSz:      uint64(unsafe.Sizeof(Cell{})),
	}
	if initialSize < 0 {
		t.Mmm = *Malloc(-1, filepath)
	} else {
		t.ArraySize = uint64(initialSize)
		t.Mmm = *Malloc(t.bytesFromArraySizeAndHeader(t.ArraySize), filepath)
	}
	t.OffheapHeader = t.Mmm.Mem
	t.OffheapCells = t.Mmm.Mem[MetadataHeaderMaxBytes:]
	t.Cells = (uintptr)(unsafe.Pointer(&t.OffheapCells[0]))
	t2 := HashTable{}
	_, err := t2.UnmarshalMsg(t.OffheapHeader)
	if err != nil {
	} else {
		if t2.MagicNumber == t.MagicNumber {
			t.Population = t2.Population
			t.ZeroUsed = t2.ZeroUsed
			t.ZeroCell = t2.ZeroCell
		}
	}
	return &t
}
type Key_t [64]byte
type Val_t [56]byte
type Cell struct {
	UnHashedKey uint64
	ByteKey     Key_t
	Value       Val_t  
}
func (cell *Cell) SetValue(v interface{}) {
	switch a := v.(type) {
	case string:
		cell.SetString(a)
	case int:
		cell.SetInt(a)
	default:
		panic("unsupported type")
	}
}
func (cell *Cell) ZeroValue() {
	for i := range cell.Value[:] {
		cell.Value[i] = 0
	}
}
func (cell *Cell) SetString(s string) {
	copy(cell.Value[:], []byte(s))
}
func (cell *Cell) GetString() string {
	return string([]byte(cell.Value[:]))
}
func (cell *Cell) SetInt(n int) {
	binary.LittleEndian.PutUint64(cell.Value[:8], uint64(n))
}
func (cell *Cell) GetInt() int {
	return int(binary.LittleEndian.Uint64(cell.Value[:8]))
}
func (v *Val_t) SetInt(n int) {
	binary.LittleEndian.PutUint64((*v)[:8], uint64(n))
}