You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[mono] Initial support for unloadable ALCs (#77399)
* [mono] Add LoaderAllocator type, whose instances are used to
detect whenever a collectible ALC has managed references.
* [mono] Add an implicit GC reference between objects allocated from a collectible ALC and its LoaderAllocator object.
* [mono] Add a new hash table which is similar to MonoGHashTable, but it doesn't keep the key/value objects alive by itself.
* [mono] Add a keepalive field to some reflection objects to keep the alc alive if user code
holds a reference to them. Change the reflection hashes in MonoMemoryManager to weak hashes
so the hashes themselves don't keep the alc alive.
* Fix reflection hashes.
* [mono] Optimize the case when mono_method_get_signature_checked () is called with a non-zero context and a non-generic signature.
* Free memory manager caches.
* [mono] Store static variables with GC references in collectible alcs
on the GC heap.
Normally, static variables are stored in an array inside MonoVTable
which is registered as a GC root. For collectible alcs, this would
not work, since GC references in these arrays would keep the alc alive.
Instead, store them in arrays referenced by the LoaderAllocator object.
This assumes the static variables will no longer be accessed after
the LoaderAllocator object dies.
* Add basic unload functionality.
* Fix weak hashes.
* Free MonoJitInfos belonging to unloaded memory managers.
* Avoid returning collectible types from mono_metadata_get_shared_type ().
* Add docs.
* Fix the build.
* Fix the build.
* Disable unloading for now.
0 commit comments