共用方式為


WebHttpBindingElement.MaxBufferPoolSize 屬性

定義

取得或設定分配給管理使用此綁定端點所需緩衝區的緩衝區管理器的最大記憶體量(位元組)。

public:
 property long MaxBufferPoolSize { long get(); void set(long value); };
[System.Configuration.ConfigurationProperty("maxBufferPoolSize", DefaultValue=524288)]
[System.Configuration.LongValidator(MinValue=0)]
public long MaxBufferPoolSize { get; set; }
[<System.Configuration.ConfigurationProperty("maxBufferPoolSize", DefaultValue=524288)>]
[<System.Configuration.LongValidator(MinValue=0)>]
member this.MaxBufferPoolSize : int64 with get, set
Public Property MaxBufferPoolSize As Long

屬性值

設定此綁定的端點所使用緩衝區池的最大大小(以位元組為單位)。 預設值為 65,536 位元組。

屬性

備註

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

適用於