MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / env_create

Function env_create

samples/render_graph/cross-process/mdb_utils.h:5–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3#include "lmdb/lmdb.h"
4
5inline static void env_create(MDB_env** penv)
6{
7 if (const int rc = mdb_env_create(penv))
8 {
9 SKR_LOG_ERROR(u8"mdb_env_create failed: %d", rc);
10 }
11 mdb_env_set_maxdbs(*penv, 50);
12 mdb_env_set_mapsize(*penv, (size_t)1048576 * (size_t)16); // 1MB * 16
13 if (const int rc = mdb_env_open(*penv, "./cross-proc", 0, 0664))
14 {
15 SKR_LOG_ERROR(u8"mdb_env_open failed: %d", rc);
16 }
17 else
18 {
19 SKR_LOG_INFO(u8"mdb_env_open succeed: %d", rc);
20 }
21}
22
23inline static void dbi_create(MDB_env* env, MDB_dbi* pdb, bool readonly)
24{

Callers 2

receiver_mainFunction · 0.85
provider_mainFunction · 0.85

Calls 4

mdb_env_createFunction · 0.85
mdb_env_set_maxdbsFunction · 0.85
mdb_env_set_mapsizeFunction · 0.85
mdb_env_openFunction · 0.85

Tested by

no test coverage detected