From c2d10cd4bb236afa19e427ee87456cf60e2e19dd Mon Sep 17 00:00:00 2001 From: Anuraag Agrawal Date: Fri, 11 Oct 2024 10:31:48 +0900 Subject: [PATCH] experimental: clarify memory allocator context is for module instantiation Signed-off-by: Anuraag Agrawal --- experimental/memory.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/experimental/memory.go b/experimental/memory.go index 26540648ba..8bf3aa35fa 100644 --- a/experimental/memory.go +++ b/experimental/memory.go @@ -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)