private void OnStart(void *target, void *proc, long memPtr)
        {
            SafeCall(() =>
            {
                var proc0 = UnmanagedUtils.Acquire(_ctx, proc);

                Ignition.OnStart(proc0, IgniteManager.Memory.Get(memPtr).Stream());
            }, true);
        }
        private long OnStart(long memPtr, long unused, long unused1, void *proc)
        {
            var proc0 = UU.Acquire(_ctx, proc);

            using (var stream = IgniteManager.Memory.Get(memPtr).GetStream())
            {
                Ignition.OnStart(proc0, stream);
            }

            return(0);
        }
        private long AffinityFunctionInit(long memPtr, long unused, long unused1, void *baseFunc)
        {
            using (var stream = IgniteManager.Memory.Get(memPtr).GetStream())
            {
                var reader = BinaryUtils.Marshaller.StartUnmarshal(stream);

                var func = reader.ReadObjectEx <IAffinityFunction>();

                ResourceProcessor.Inject(func, _ignite);

                var affBase = func as AffinityFunctionBase;

                if (affBase != null)
                {
                    var baseFunc0 = new PlatformJniTarget(UU.Acquire(_ctx, baseFunc), _ignite.Marshaller);

                    affBase.SetBaseFunction(new PlatformAffinityFunction(baseFunc0));
                }

                return(_handleRegistry.Allocate(func));
            }
        }