MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / main

Function main

deps/memkind/src/examples/pmem_cpp_allocator.cpp:146–166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144}
145
146int main(int argc, char *argv[])
147{
148 const char *pmem_directory = "/tmp/";
149
150 if (argc > 2) {
151 std::cerr << "Usage: pmem_cpp_allocator [directory path]\n"
152 << "\t[directory path] - directory where temporary file is created (default = \"/tmp/\")"
153 << std::endl;
154 return 0;
155 } else if (argc == 2) {
156 struct stat st;
157 if (stat(argv[1], &st) != 0 || !S_ISDIR(st.st_mode)) {
158 fprintf(stderr,"%s : Invalid path to pmem kind directory", argv[1]);
159 return 1;
160 }
161 pmem_directory = argv[1];
162 }
163
164 cpp_allocator_test(pmem_directory);
165 return 0;
166}

Callers

nothing calls this directly

Calls 2

cpp_allocator_testFunction · 0.85
statClass · 0.70

Tested by

no test coverage detected