You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow navy/common/Device to take a BufferView to avoid unnecessary deep copy
Summary:
Before this diff, the Device class takes ownership of the buffer to be written into the NVM device.
After this diff, the Device class can take either a buffer with ownership, or a buffer view.
If a buffer is used and there is encryption, the Device class will overwrite this buffer.
If a buffer view is used and there is encryption, the Device class will make a copy of this buffer view and encrypt-overwrite the created buffer.
A future optimization could be to allow the encryptor directly create and write the encrypted content into the new buffer.
Reviewed By: jaesoo-fb
Differential Revision: D42050939
fbshipit-source-id: dc0ccecb03462f43aabf645f21ccc7b245915b15
0 commit comments