xref: /aosp_15_r20/external/leveldb/helpers/memenv/memenv.h (revision 9507f98c5f32dee4b5f9e4a38cd499f3ff5c4490)
1 // Copyright (c) 2011 The LevelDB Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. See the AUTHORS file for names of contributors.
4 
5 #ifndef STORAGE_LEVELDB_HELPERS_MEMENV_MEMENV_H_
6 #define STORAGE_LEVELDB_HELPERS_MEMENV_MEMENV_H_
7 
8 #include "leveldb/export.h"
9 
10 namespace leveldb {
11 
12 class Env;
13 
14 // Returns a new environment that stores its data in memory and delegates
15 // all non-file-storage tasks to base_env. The caller must delete the result
16 // when it is no longer needed.
17 // *base_env must remain live while the result is in use.
18 LEVELDB_EXPORT Env* NewMemEnv(Env* base_env);
19 
20 }  // namespace leveldb
21 
22 #endif  // STORAGE_LEVELDB_HELPERS_MEMENV_MEMENV_H_
23