Uploaded image for project: 'Mesos'
  1. Mesos
  2. MESOS-2569

Introduce Buffer abstraction to minimize inline buffer size constants, allocation and safe-guards

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Trivial
    • Resolution: Unresolved
    • None
    • None
    • None

    Description

      We tend to have code (mostly in libprocess) like:

        if (socket.isReady()) {
          // Inform the socket manager for proper bookkeeping.
          socket_manager->accepted(socket.get());
      
          const size_t size = 80 * 1024;
          char* data = new char[size];
          memset(data, 0, size);
      

      We can introduce a Buffer abstraction to stout which hides the pointers and helps initializing, copying, etc. This should make those buffers less error prone too.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            nnielsen Niklas Quarfot Nielsen

            Dates

              Created:
              Updated:

              Slack

                Issue deployment