Changeset 235499 in webkit


Ignore:
Timestamp:
Aug 30, 2018 7:01:49 AM (6 years ago)
Author:
yoshiaki.jitsukawa@sony.com
Message:

[ConnectionUnix] Shrink sizeof AttachmentInfo by reordering members
https://bugs.webkit.org/show_bug.cgi?id=189149

Reviewed by Michael Catanzaro.

Reorder members to shrink the size of AttachmentInfo so that
we can attach more attachments.

  • Platform/IPC/unix/ConnectionUnix.cpp:
Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r235495 r235499  
     12018-08-30  Yoshiaki Jitsukawa  <yoshiaki.jitsukawa@sony.com>
     2
     3        [ConnectionUnix] Shrink sizeof AttachmentInfo by reordering members
     4        https://bugs.webkit.org/show_bug.cgi?id=189149
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        Reorder members to shrink the size of AttachmentInfo so that
     9        we can attach more attachments.
     10
     11        * Platform/IPC/unix/ConnectionUnix.cpp:
     12
    1132018-08-29  Chris Dumez  <cdumez@apple.com>
    214
  • trunk/Source/WebKit/Platform/IPC/unix/ConnectionUnix.cpp

    r229309 r235499  
    6060
    6161static const size_t messageMaxSize = 4096;
    62 static const size_t attachmentMaxAmount = 255;
     62static const size_t attachmentMaxAmount = 254;
    6363
    6464class AttachmentInfo {
     
    8787private:
    8888    Attachment::Type m_type { Attachment::Uninitialized };
     89    bool m_isNull { false };
    8990    size_t m_size { 0 };
    90     bool m_isNull { false };
    9191};
     92
     93static_assert(sizeof(MessageInfo) + sizeof(AttachmentInfo) * attachmentMaxAmount <= messageMaxSize, "messageMaxSize is too small.");
    9294
    9395void Connection::platformInitialize(Identifier identifier)
Note: See TracChangeset for help on using the changeset viewer.