currentMemoryAdapter returns the wired adapter or nil.
()
| 74 | |
| 75 | // currentMemoryAdapter returns the wired adapter or nil. |
| 76 | func currentMemoryAdapter() MemoryAdapter { |
| 77 | v := memoryAdapterAtom.Load() |
| 78 | if v == nil { |
| 79 | return nil |
| 80 | } |
| 81 | h, _ := v.(memAdapterHolder) |
| 82 | return h.a |
| 83 | } |
| 84 | |
| 85 | // BuiltinMemoryPlugin is the @memory tool. |
| 86 | type BuiltinMemoryPlugin struct{} |