/////////////////////////////////////////////////////////////////////////////// // // Microsoft Research Singularity - Singularity ABI // // Copyright (c) Microsoft Corporation. All rights reserved. // // File: SharedHeapService.csi // // Note: // using System; using System.Runtime.CompilerServices; using Microsoft.Singularity.V1.Types; namespace Microsoft.Singularity.V1.Services { [CLSCompliant(false)] public struct SharedHeapService { public struct Allocation { // No fields visible to ABI callers. } public struct AllocationOwnerId { // No fields visible to ABI callers. } [NoHeapAllocation] public static unsafe UIntPtr GetData(Allocation *allocation); [NoHeapAllocation] public static unsafe UIntPtr GetSize(Allocation *allocation); [NoHeapAllocation] public static unsafe UIntPtr GetType(Allocation *allocation); [NoHeapAllocation] public static unsafe Allocation *Allocate(UIntPtr size, SystemType type, uint alignment); /// true if last reference was freed [NoHeapAllocation] public static unsafe bool Free(Allocation *allocation); [NoHeapAllocation] public static unsafe Allocation *Share(Allocation *allocation, UIntPtr startOffset, UIntPtr endOffset); [NoHeapAllocation] public static unsafe Allocation *Split(Allocation *allocation, UIntPtr offset); [NoHeapAllocation] public static unsafe void Truncate(Allocation *allocation, UIntPtr offset); #if NOT_YET [NoHeapAllocation] public static unsafe void TransferTo( Allocation *allocation, AllocationOwnerId newOwner); [NoHeapAllocation] public static unsafe void TransferFrom( Allocation *allocation, AllocationOwnerId oldOwner); #endif } }