mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-02-10 18:05:41 +08:00
[x2t] Rename MEMORY_LIMIT -> X2T_MEMORY_LIMIT; "0" is no memory limit
This commit is contained in:
committed by
Sergey Konovalov
parent
6148c337d9
commit
faeac14054
@ -47,7 +47,7 @@ namespace NSSystemUtils
|
||||
static const wchar_t* gc_EnvCreated = L"CREATED";
|
||||
static const wchar_t* gc_EnvLastModifiedBy = L"LAST_MODIFIED_BY";
|
||||
static const wchar_t* gc_EnvModified = L"MODIFIED";
|
||||
static const wchar_t* gc_EnvMemoryLimit = L"MEMORY_LIMIT";
|
||||
static const wchar_t* gc_EnvMemoryLimit = L"X2T_MEMORY_LIMIT";
|
||||
static const wchar_t* gc_EnvMemoryLimitDefault = L"4294965097";//4GB
|
||||
|
||||
KERNEL_DECL std::wstring GetEnvVariable(const std::wstring& strName);
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
#include <chrono>
|
||||
#include <vector>
|
||||
|
||||
#include "../../../../DesktopEditor/common/proclimits.h"
|
||||
#include "../../../../Common/3dParty/misc/proclimits.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
#include <iostream>
|
||||
#include <cstdlib>
|
||||
|
||||
#include "../../../../DesktopEditor/common/proclimits.h"
|
||||
#include "../../../../Common/3dParty/misc/proclimits.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
@ -33,7 +33,7 @@
|
||||
#include "cextracttools.h"
|
||||
#include "ASCConverters.h"
|
||||
#include "../../DesktopEditor/common/SystemUtils.h"
|
||||
#include "../../DesktopEditor/common/proclimits.h"
|
||||
#include "../../Common/3dParty/misc/proclimits.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
@ -120,7 +120,9 @@ static std::wstring utf8_to_unicode(const char *src)
|
||||
std::wstring sMemoryLimit = NSSystemUtils::GetEnvVariable(NSSystemUtils::gc_EnvMemoryLimit);
|
||||
if (sMemoryLimit.empty())
|
||||
sMemoryLimit = NSSystemUtils::gc_EnvMemoryLimitDefault;
|
||||
limit_memory((size_t)std::stoull(sMemoryLimit));
|
||||
size_t nMemoryLimit = (size_t)std::stoull(sMemoryLimit);
|
||||
if (nMemoryLimit > 0)
|
||||
limit_memory(nMemoryLimit);
|
||||
|
||||
std::wstring sArg1, sArg2, sExePath;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user