mirror of
https://github.com/wazero/wazero
synced 2026-06-21 14:12:37 +00:00
experimental: clarify memory allocator context is for module instantiation (#2331)
Signed-off-by: Anuraag Agrawal <anuraaga@gmail.com>
This commit is contained in:
committed by
GitHub
parent
6016a705fa
commit
c8d0f0ac17
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user