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
Context: dotnet/runtime#114184
Context: https://github.com/jonathanpeppers/BridgeSandbox
Context: dotnet/runtime@main...BrzVlad:runtime:feature-clr-gcbridge
So far, I:
* Built dotnet/runtime, I built this branch:
https://github.com/jonathanpeppers/runtime/tree/gcbridge_impl
* Put the relevant arm64 packs in `packages/` folder and configured a
`NuGet.config` to use them.
* Setup `build-tools\scripts\custom-runtime.targets` to use the
10.0.0-dev dotnet/runtime packs.
* In `ManagedValueManager.cs`...
* Call a new native method on startup:
var mark_cross_references_ftn = RuntimeNativeMethods.clr_initialize_gc_bridge (&BridgeProcessingFinished);
* Pass the returned function pointer to:
JavaMarshal.Initialize (mark_cross_references_ftn);
* In `AddPeer(IJavaPeerable value)` call `JavaMarshal.CreateReferenceTrackingHandle()`
* In `RemovePeer(IJavaPeerable value)` call:
static unsafe void FreeHandle (GCHandle handle)
{
IntPtr context = JavaMarshal.GetContext (handle);
NativeMemory.Free((void*)context);
}
/// Initializes the "GC Bridge" implementation for the CoreCLR runtime.
99
+
/// </summary>
100
+
/// <param name="bridge_processing_finished_callback">A function pointer to a C# callback that will be invoked when bridge processing has completed.</param>
101
+
/// <returns>A function pointer that should be passed to JavaMarshal.Initialize() on startup.</returns>
0 commit comments