Skip to content

Conversation

guybedford
Copy link
Collaborator

While formally not a memory leak, this reduces Wasm memory usage for durable objects subject to hibernation by eagerly freeing Wasm memory associated with the stale instance when a new instance is constructed.

@guybedford
Copy link
Collaborator Author

Unfortunately this fails because destroying the last instance when a new instance is constructed doesn't work since it seems we support constructing multiple in the same isolate of a given durable object.

@guybedford
Copy link
Collaborator Author

It turns out this requires upstream work to properly support, given the multi-DO handling.

@guybedford
Copy link
Collaborator Author

An upstream change for an unload event is posted in cloudflare/workerd#5211.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant