mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-10 00:41:26 +12:00
Increase open file limit on Linux
Add some assertions to VirtualMemory.cpp
This commit is contained in:
parent
3c70645f0b
commit
a46ef4f29a
2 changed files with 34 additions and 7 deletions
|
@ -13,6 +13,11 @@
|
|||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#ifdef __linux__
|
||||
#include <sys/time.h>
|
||||
#include <sys/resource.h>
|
||||
#endif
|
||||
|
||||
inline std::string sstr(const QString& _in) { return _in.toStdString(); }
|
||||
|
||||
template <typename... Args>
|
||||
|
@ -85,6 +90,14 @@ int main(int argc, char** argv)
|
|||
qputenv("QT_AUTO_SCREEN_SCALE_FACTOR", "1");
|
||||
#endif
|
||||
|
||||
#ifdef __linux__
|
||||
struct ::rlimit rlim;
|
||||
rlim.rlim_cur = 4096;
|
||||
rlim.rlim_max = 4096;
|
||||
if (::setrlimit(RLIMIT_NOFILE, &rlim) != 0)
|
||||
std::fprintf(stderr, "Failed to set max open file limit (4096).");
|
||||
#endif
|
||||
|
||||
QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
||||
QCoreApplication::setAttribute(Qt::AA_DisableWindowContextHelpButton);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue