Custom Windows allocator.

This commit is contained in:
Nuno Cruces
2024-05-17 16:42:43 +01:00
parent 323bd6e47e
commit bdaf77a657
8 changed files with 112 additions and 17 deletions

View File

@@ -14,7 +14,7 @@ type moduleState struct {
func NewContext(ctx context.Context) context.Context {
state := new(moduleState)
ctx = withMmappedAllocator(ctx)
ctx = withAllocator(ctx)
ctx = experimental.WithCloseNotifier(ctx, state)
ctx = context.WithValue(ctx, moduleKey{}, state)
return ctx