MemoryEncoder returns a memory encoder using the state's memory layout to encode to the pool p, for the range rng.
(p memory.PoolID, rng memory.Range)
| 151 | // MemoryEncoder returns a memory encoder using the state's memory layout |
| 152 | // to encode to the pool p, for the range rng. |
| 153 | func (s GlobalState) MemoryEncoder(p memory.PoolID, rng memory.Range) *memory.Encoder { |
| 154 | return memory.NewEncoder(s.MemoryWriter(p, rng), s.MemoryLayout) |
| 155 | } |
| 156 | |
| 157 | // Alloc allocates a memory range using the Allocator associated with |
| 158 | // the given State, and returns a AllocResult that can be used to access the |