Niklas Quarfot Nielsen created MESOS-2569:
---------------------------------------------
Summary: Introduce Buffer abstraction to minimize inline buffer
size constants, allocation and safe-guards
Key: MESOS-2569
URL: https://issues.apache.org/jira/browse/MESOS-2569
Project: Mesos
Issue Type: Improvement
Components: technical debt
Reporter: Niklas Quarfot Nielsen
Priority: Trivial
We tend to have code (mostly in libprocess) like:
{code}
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);
{code}
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.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)