1. 05 Jul, 2015 3 commits
    • Jens Auer's avatar
      - Replaced C-style casts with C++-casts · ef365151
      Jens Auer authored
      - Replaced stdlib.h with cstdlib
      - Made single-argument constructors explicit
      ef365151
    • Pieter Hintjens's avatar
      Merge pull request #1466 from jens-auer/upstream · f541ac96
      Pieter Hintjens authored
      "zero-copy" raw_decoder
      f541ac96
    • Jens Auer's avatar
      "zero-copy" raw_decoder · 36797936
      Jens Auer authored
      A memcpy is eliminated when receiving data on a ZMQ_STREAM socket. Instead
      of receiving into a static buffer and then copying the data into the
      buffer malloced in msg_t::init_size, the raw_decoder allocates the memory
      for together with the reference-counter and creates a msg_t object
      on top of that memory. This saves the memcpy operation.
      
      For small messages, data is still copied and the receive buffer is reused.
      36797936
  2. 02 Jul, 2015 2 commits
  3. 01 Jul, 2015 3 commits
  4. 30 Jun, 2015 7 commits
  5. 29 Jun, 2015 8 commits
  6. 26 Jun, 2015 2 commits
  7. 24 Jun, 2015 5 commits
  8. 23 Jun, 2015 4 commits
  9. 14 Jun, 2015 4 commits
    • Pieter Hintjens's avatar
      Merge pull request #1441 from jens-auer/rebase3 · d33fb6a2
      Pieter Hintjens authored
      Rebase3
      d33fb6a2
    • Jens Auer's avatar
      Reuse buffer when no messages depend on it. · e70b5efa
      Jens Auer authored
      e70b5efa
    • Jens Auer's avatar
      Fixed wrong handling of shared messages · 51cb57e2
      Jens Auer authored
      The shared reference count was not shared but copied. msg_t cannot
      store the refcnt itsef but has to store a pointer to an externally
      allocated (shared) refcnter. The changes to lmsg are reverted to
      use content_t again. Howver, this introduces an allocation in v2_decoder
      when creating the message which can be avoided. When allocating the reception
      buffer, space is allocated for the maximum number of reference counts
      (8192 / max_vsm_size = 8192/64 = 128 zmq:atomic_counter objects). This
      increases the buffer by 128*sizeof(atomic_counter) = 128*4 = 512 bytes only.
      When creating a message, the refcnt member is set to the address of one of the
      pre-allocated atomic_counter_t objects. To do so, a new msg_t type zcmsg
      is introduced because msg::copy must discriminate between the message types
      when releasing memory.
      51cb57e2
    • Jens Auer's avatar
      Fixed wrong buffer end detection in v2_decoder. · dfe19080
      Jens Auer authored
      zero-copy msg_t::init cannot be used when the message exceeds either
      the buffer end or the last received byte. To detect this, the buffer
      is now resized to the numnber of received bytes.
      dfe19080
  10. 13 Jun, 2015 2 commits