예제 #1
0
        internal static void *Malloc(long size)
        {
            var result = new PinnedArray <byte>(size);

            _pointers[(long)result.Ptr] = result;

            return(result.Ptr);
        }
예제 #2
0
 internal static void MemMove(void *a, void *b, long size)
 {
     using (var temp = new PinnedArray <byte>(size))
     {
         CRuntime.memcpy(temp.Ptr, b, size);
         CRuntime.memcpy(a, temp.Ptr, size);
     }
 }