Re: Buffering TCPIP data



On Jun 6, 3:41 pm, ShaunO <Sha...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
The messages could be any size but never likely to go above 128 bytes.
It would be very helpful if you could outline the benefits of a circular
buffer over the byte array that i outlined so that i can evaluate if i need
to re-implement.

You'd implement the circular buffer with an underlying byte array - it
means that when you've copied the data out for the message, you can
just update the logical "next message start" to the end of the
previous one, with no extra copying involved - i.e. you don't copy the
data you've already received from the next message.

Jon
.



Relevant Pages

  • Re: [PATCH 10/24] x86/oprofile: Add IBS support for AMD CPUs, IBS buffer handling routines
    ... This is the core of the buffer management. ... another architecture to reuse this code. ... Each CPU has a local buffer that stores PC value/event ... If we just passed in an array of data that is ready to just be copied ...
    (Linux-Kernel)
  • Re: memory-efficient circshift mex?
    ... Separately store only the slices that must be circulated to the bottom of the array, ... the native circhsift.m naively allocates an additional array of sizeregardless of N. This is of course difficult for me given the size of X. ... // Circular shift a 3-dimensional or higher matrix in the last dimension. ... mwSize ndim, numel, k, slicenumel, slicebytes, kshift; ...
    (comp.soft-sys.matlab)
  • Re: memory-efficient circshift mex?
    ... Separately store only the slices that must be circulated to the bottom of the array, ... the native circhsift.m naively allocates an additional array of sizeregardless of N. This is of course difficult for me given the size of X. ... // Circular shift a 3-dimensional or higher matrix in the last dimension. ... mwSize ndim, numel, k, slicenumel, slicebytes, kshift; ...
    (comp.soft-sys.matlab)
  • Re: Serialization and Deserialization
    ... But when I get the array of bytes back it is only the ... by using the buffer size of 8000. ... In the database I am using varbinary to store this binary data, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: [PATCH 10/24] x86/oprofile: Add IBS support for AMD CPUs, IBS buffer handling routines
    ... This is the core of the buffer management. ... another architecture to reuse this code. ... Each CPU has a local buffer that stores PC value/event ... If we just passed in an array of data that is ready to just be copied ...
    (Linux-Kernel)