[
https://issues.apache.org/jira/browse/MESOS-1919?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14183709#comment-14183709
]
Evelina Dumitrescu commented on MESOS-1919:
-------------------------------------------
[~jmlvanre] Your concern on using the stl vector representation was that the
stl vector will alocate more memory than is needed.
The stl vector initial capacity starts from 0(for the default constructor) and
doubles the allocated memory when reallocation is needed. And for the
particular case of the IPV4 and IPv6 sizes(which have the form of power of two)
memory will not be allocated and then left unused.
> Create IP address abstraction
> -----------------------------
>
> Key: MESOS-1919
> URL: https://issues.apache.org/jira/browse/MESOS-1919
> Project: Mesos
> Issue Type: Task
> Components: libprocess
> Reporter: Dominic Hamon
> Assignee: Evelina Dumitrescu
> Priority: Minor
>
> in the code many functions need only the ip address to be passed as a
> parameter. I don't think it would be desirable to use a struct
> SockaddrStorage (MESOS-1916).
> Consider using a {{std::vector<unsigned char>}} (see {{typedef
> std::vector<unsigned char> IPAddressNumber;}} in the Chromium project)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)