Commit 1cd1bfb6 authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook Github Bot

Avoid unnecessary virtualization in MemoryMapping

Summary: [Folly] Avoid unnecessary virtualization in `MemoryMapping`.

Reviewed By: Orvid

Differential Revision: D19261862

fbshipit-source-id: 520f1182477bc723c8f42505b30fc09e00758d05
parent 99642ef2
......@@ -18,7 +18,6 @@
#include <algorithm>
#include <cerrno>
#include <functional>
#include <utility>
#include <glog/logging.h>
......@@ -244,8 +243,9 @@ off_t memOpChunkSize(off_t length, off_t pageSize) {
* - success: true + amountSucceeded == bufSize (op success on whole buffer)
* - failure: false + amountSucceeded == nr bytes on which op succeeded.
*/
template <typename Op>
bool memOpInChunks(
std::function<int(void*, size_t)> op,
Op op,
void* mem,
size_t bufSize,
off_t pageSize,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment