共用方式為


WebHttpBindingElement.MaxBufferSize 屬性

定義

取得或設定分配給接收通道訊息緩衝區的管理者的最大記憶體容量(位元組)。

public:
 property int MaxBufferSize { int get(); void set(int value); };
[System.Configuration.ConfigurationProperty("maxBufferSize", DefaultValue=65536)]
[System.Configuration.IntegerValidator(MinValue=1)]
public int MaxBufferSize { get; set; }
[<System.Configuration.ConfigurationProperty("maxBufferSize", DefaultValue=65536)>]
[<System.Configuration.IntegerValidator(MinValue=1)>]
member this.MaxBufferSize : int with get, set
Public Property MaxBufferSize As Integer

屬性值

訊息緩衝管理器可使用的最大記憶體容量(位元組)。 預設值為 524,288(0x80000)位元組。

屬性

例外狀況

該值集合小於或等於零。

備註

BufferManager透過使用緩衝池來降低使用緩衝區的成本。 緩衝區是服務在訊息從通道中發出時必須處理的。 若緩衝池中沒有足夠的記憶體來處理訊息載入,必須 BufferManager 從 CLR 堆積中分配額外記憶體,這會增加垃圾回收的開銷。 CLR 垃圾堆的大量配置表示緩衝池容量過小,且透過增加 MaxBufferPoolSize 限制來提升效能。

適用於