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