experimental: clarify memory allocator context is for module instantiation (#2331)

Signed-off-by: Anuraag Agrawal <anuraaga@gmail.com>
This commit is contained in:
Anuraag (Rag) Agrawal
2024-10-11 10:56:31 +09:00
committed by GitHub
parent 6016a705fa
commit c8d0f0ac17
+1 -1
View File
@@ -43,7 +43,7 @@ type LinearMemory interface {
}
// WithMemoryAllocator registers the given MemoryAllocator into the given
// context.Context.
// context.Context. The context must be passed when initializing a module.
func WithMemoryAllocator(ctx context.Context, allocator MemoryAllocator) context.Context {
if allocator != nil {
return context.WithValue(ctx, expctxkeys.MemoryAllocatorKey{}, allocator)