Open cthulhu-rider opened 10 months ago
Usually if you need a custom allocator you're doing something wrong, it'll be complicated and buggy. Pools/buffers should be sufficient for this.
Pools/buffers should be sufficient for this
these are custom allocators to me
object slicer allocates byte buffers of certain size using Go built-in
make
function. From one side, it's normal default behavior for the library functionality. At the same time, some applications may desire to manage memory allocations deeper in order to improve app's performanceit's proposed to define app-level memory allocator (interface) and support it by the slicer as option. If set, this allocator is be used for processing, otherwise, slicer defaults to
make
additionally, this approach will allow to get rid of https://github.com/nspcc-dev/neofs-sdk-go/blob/1db2fbf3c1ad047d1ab3dd74d7c3a930856cf0f0/object/slicer/options.go#L58-L60 that requires buffer to be of size
MaxObjectSize
(64MB).