VirtualBox

Changeset 65219 in vbox


Ignore:
Timestamp:
Jan 10, 2017 11:00:36 AM (8 years ago)
Author:
vboxsync
Message:

Devices/Storage/IOBufMgmt: Update the amount of free memory immediately after the segment was allocated to prevent resetting bins if multiple segments are allocated. Fixes obscure data corruption in the data buffers because of segments pointing to the same address.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/IOBufMgmt.cpp

    r65101 r65219  
    275275        cbAlloc = pSeg->cbSeg;
    276276        AssertPtr(pSeg->pvSeg);
     277
     278        pThis->cbFree -= cbAlloc;
    277279    }
    278280
     
    406408               || RT_FAILURE(rc));
    407409
    408         pThis->cbFree -= cbIoBufAlloc;
    409 
    410410        RTCritSectLeave(&pThis->CritSectAlloc);
    411411    }
Note: See TracChangeset for help on using the changeset viewer.

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