From d7cfdfc0d99e58efa171b2c9f6a06e8693d9b7e2 Mon Sep 17 00:00:00 2001 From: jacobbdavis1991 <35181018+jacobbdavis1991@users.noreply.github.com> Date: Fri, 19 Jan 2018 11:09:48 -0800 Subject: [PATCH] Update memenv.h --- src/leveldb/helpers/memenv/memenv.h | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/leveldb/helpers/memenv/memenv.h b/src/leveldb/helpers/memenv/memenv.h index ab5bde1..cba7a10 100644 --- a/src/leveldb/helpers/memenv/memenv.h +++ b/src/leveldb/helpers/memenv/memenv.h @@ -2,6 +2,19 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. See the AUTHORS file for names of contributors. -#ifndef __STDC_LIMIT_MACROS -#define __STDC_LIMIT_MACROS -#endif +#ifndef STORAGE_LEVELDB_HELPERS_MEMENV_MEMENV_H__STDC_LIMIT_MACROS +#define STORAGE_LEVELDB_HELPERS_MEMENV_MEMENV_H__STDC_LIMIT_MACROS + +namespace leveldb { + +class Env; + +// Returns a new environment that stores its data in memory and delegates +// all non-file-storage tasks to base_env. The caller must delete the result +// when it is no longer needed. +// *base_env must remain live while the result is in use. +Env* NewMemEnv(Env* base_env); + +} // namespace leveldb + +#endif // STORAGE_LEVELDB_HELPERS_MEMENV_MEMENV_H_