Serializes memory blocks using memory pools for high-performance client-server communication. Reuse in low-latency distributed systems and caching layers.
// Source: https://github.com/microsoft/FASTER | License: MIT | Copyright Microsoft Corporation. All rights reserved
// Provided via justclaw.it.com; keep this notice with the code.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.
using FASTER.common;
using System;
using System.Buffers;
using System.Runtime.InteropServices;
namespace FASTER.client
{
/// <summary>
/// Serializer for Memory
/// </summary>
/// <typeparam name="T">Type of memory</typeparam>
public unsafe class MemoryParameterSerializer<T> : IClientSerializer<ReadOnlyMemory<T>, ReadOnlyMemory<T>, ReadOnlyMemory<T>, (IMemoryOwner<T>, int)>
where T : unmanaged
{
readonly MemoryPool<T> memoryPool;
/// <summary>
/// Constructo
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key