共用方式為


NativePtr.stackalloc<'T> 函式 (F#)

在堆疊上配置記憶體區域。

命名空間/模組路徑: Microsoft.FSharp.NativeInterop.NativePtr

組件:FSharp.Core (在 FSharp.Core.dll 中)

// Signature:
NativePtr.stackalloc : int -> nativeptr<'T> (requires unmanaged)

// Usage:
NativePtr.stackalloc count

參數

  • count
    型別:int

    要配置之型別 T 的物件數目。

傳回值

已配置之記憶體的具型別指標。

備註

這個函式是名為 StackAllocate中 已編譯的組件。 如果從以.NET 語言,F # 以外,或透過反映存取成員使用這個名稱。

平台

Windows 7、Windows Vista SP2、Windows XP SP3、Windows XP x64 SP2、Windows Server 2008 R2、Windows Server 2008 SP2、Windows Server 2003 SP2

版本資訊

F# 執行階段

支援版本:2.0、4.0

Silverlight

支援版本:3

請參閱

參考

NativeInterop.NativePtr 模組 (F#)

Microsoft.FSharp.NativeInterop 命名空間 (F#)