X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=folly%2FMemoryMapping.h;h=280a261fd6407c14d596dd419f57310e5951f694;hb=587e4b4d914c477b79120fb6559571d2dc5d040d;hp=d404a7853c04cd51fe0af49633bbc170ac592de5;hpb=75c6adfae4a1842511e8b62150cc18ffb391efa7;p=folly.git diff --git a/folly/MemoryMapping.h b/folly/MemoryMapping.h index d404a785..280a261f 100644 --- a/folly/MemoryMapping.h +++ b/folly/MemoryMapping.h @@ -1,5 +1,5 @@ /* - * Copyright 2014 Facebook, Inc. + * Copyright 2015 Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -53,7 +53,7 @@ class MemoryMapping : boost::noncopyable { * likely become inaccessible) when the MemoryMapping object is destroyed. */ struct Options { - Options() { } + Options() {} // Convenience methods; return *this for chaining. Options& setPageSize(off_t v) { pageSize = v; return *this; } @@ -157,6 +157,7 @@ class MemoryMapping : boost::noncopyable { * Advise the kernel about memory access. */ void advise(int advice) const; + void advise(int advice, size_t offset, size_t length) const; /** * A bitwise cast of the mapped bytes as range of values. Only intended for