Example #1
0
        public static IntPtr AllocateThunk(object thunksHeap)
        {
            IntPtr newThunk = RuntimeImports.RhAllocateThunk(thunksHeap);

            if (newThunk == IntPtr.Zero)
            {
                throw new OutOfMemoryException();
            }
            return(newThunk);
        }
Example #2
0
        public static IntPtr AllocateThunk(object thunksHeap)
        {
            IntPtr newThunk = RuntimeImports.RhAllocateThunk(thunksHeap);

            if (newThunk == IntPtr.Zero)
            {
                throw new OutOfMemoryException();
            }
            TypeLoaderCallbacks.RegisterThunk(newThunk);
            return(newThunk);
        }