MCPcopy Create free account
hub / github.com/FEX-Emu/FEX / GetNumFilesOpen

Function GetNumFilesOpen

Source/Tools/FEXServer/ProcessPipe.cpp:37–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35std::atomic<size_t> NumFilesOpened {};
36
37size_t GetNumFilesOpen() {
38 // Walk /proc/self/fd/ to see how many open files we currently have
39 const std::filesystem::path self {"/proc/self/fd/"};
40
41 return std::distance(std::filesystem::directory_iterator {self}, std::filesystem::directory_iterator {});
42}
43
44void GetMaxFDs() {
45 // Get our kernel limit for the number of open files

Callers 2

GetMaxFDsFunction · 0.85
CheckRaiseFDLimitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected