Example #1
0
 HandleCreatedGcEvent(BinaryReader reader)
 {
     TimeDiff   = reader.ReadULeb128();
     HandleType = (System.Runtime.InteropServices.GCHandleType)reader.ReadULeb128();
     Handle     = reader.ReadULeb128();
     ObjAddr    = reader.ReadSLeb128();
 }
Example #2
0
        //[java.attr.RetainType] private java.util.concurrent.atomic.AtomicLong pinned;

        public static GCHandle Alloc(object value, System.Runtime.InteropServices.GCHandleType type)
        {
            var h = new GCHandle()
            {
                objref = value
            };

            if (type == System.Runtime.InteropServices.GCHandleType.Pinned)
            {
                h.pinned = true;
                if (value != null)
                {
                    var trackedObject =
                        IdentifierWeakTable.Global.GetTrackedObject(value);

                    h.handle = (trackedObject != null) ? trackedObject.id
                             : IdentifierWeakTable.GlobalGenerate(value);

                    //h.pinned = new java.util.concurrent.atomic.AtomicLong();
                }
            }
            else if (type != System.Runtime.InteropServices.GCHandleType.Normal)
            {
                throw new System.PlatformNotSupportedException();
            }
            return(h);
        }
        public static GCHandleBypass Alloc(object obj, System.Runtime.InteropServices.GCHandleType type)
        {
            if (cached_alloc == null)
            {
                initCopy();
            }

            return(new GCHandleBypass(cached_alloc.Invoke(null, new object[] { obj, type })));
        }
 public static System.Runtime.InteropServices.GCHandle Alloc(object value, System.Runtime.InteropServices.GCHandleType type)
 {
     return(default(System.Runtime.InteropServices.GCHandle));
 }
Example #5
0
 HandleDestroyedGcEvent(BinaryReader reader)
 {
     TimeDiff   = reader.ReadULeb128();
     HandleType = (System.Runtime.InteropServices.GCHandleType)reader.ReadULeb128();
     Handle     = reader.ReadULeb128();
 }
Example #6
0
		HandleDestroyedGcEvent (BinaryReader reader)
		{
			TimeDiff = reader.ReadULeb128 ();
			HandleType = (System.Runtime.InteropServices.GCHandleType)reader.ReadULeb128 ();
			Handle = reader.ReadULeb128 ();
		}
Example #7
0
		HandleCreatedGcEvent (BinaryReader reader)
		{
			TimeDiff = reader.ReadULeb128 ();
			HandleType = (System.Runtime.InteropServices.GCHandleType)reader.ReadULeb128 ();
			Handle = reader.ReadULeb128 ();
			ObjAddr = reader.ReadSLeb128 ();
		}