[#20] Optimize memory usage

Provide custom buffer and use ArrayPool

Signed-off-by: Pavel Gross <p.gross@yando.com>
This commit is contained in:
Pavel Gross 2024-08-05 11:21:05 +03:00
parent 6083834582
commit 18126ea763
3 changed files with 76 additions and 35 deletions

View file

@ -1,6 +1,7 @@
using System.Collections.Specialized;
using FrostFS.SDK.ModelsV2;
using System.Collections.Specialized;
using System.IO;
using FrostFS.SDK.ModelsV2;
namespace FrostFS.SDK.ClientV2.Parameters;
public sealed class PrmObjectPut : IContext, ISessionToken
@ -31,6 +32,11 @@ public sealed class PrmObjectPut : IContext, ISessionToken
/// <value>Size of the buffer</value>
public int BufferMaxSize { get; set; }
/// <summary>
/// Allows to define a buffer for chunks to manage by the memory allocation and releasing.
/// </summary>
public byte[]? CustomBuffer { get; set; }
/// <summary>
/// FrostFS request X-Headers
/// </summary>