Resize resizes the memory to size
(size uint64)
| 64 | |
| 65 | // Resize resizes the memory to size |
| 66 | func (m *Memory) Resize(size uint64) { |
| 67 | if uint64(m.Len()) < size { |
| 68 | m.store = append(m.store, make([]byte, size-uint64(m.Len()))...) |
| 69 | } |
| 70 | } |
| 71 | |
| 72 | // Get returns offset + size as a new slice |
| 73 | func (m *Memory) Get(offset, size int64) (cpy []byte) { |