VirtualBox

Changeset 79278 in vbox


Ignore:
Timestamp:
Jun 21, 2019 1:52:35 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
131471
Message:

Main/GuestFileImpl.cpp: Cap the read and readAt requests at 1 MiB so as to not waste memory on aData buffer space that won't be used, given the that guest side won't return more than a MiB. bugref:9320

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/GuestFileImpl.cpp

    r79254 r79278  
    14021402    LogFlowThisFuncEnter();
    14031403
     1404    /* Cap the read at 1MiB because that's all the guest will return anyway. */
     1405    if (aToRead > _1M)
     1406        aToRead = _1M;
     1407
    14041408    aData.resize(aToRead);
    14051409
     
    14361440
    14371441    LogFlowThisFuncEnter();
     1442
     1443    /* Cap the read at 1MiB because that's all the guest will return anyway. */
     1444    if (aToRead > _1M)
     1445        aToRead = _1M;
    14381446
    14391447    aData.resize(aToRead);
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette