Skip to content

Commit

Permalink
fix(memoryLimit): use default memory limit of 4G - 1
Browse files Browse the repository at this point in the history
closes #240
  • Loading branch information
felixfbecker committed Jan 2, 2018
1 parent 339b8a3 commit 79edb58
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
"properties": {
"php.memoryLimit": {
"type": "string",
"default": "4G",
"default": "4095M",
"description": "The memory limit of the php language server. [Number][K|M|G]. Use '-1' to allow unlimited use of the RAM (default is 4G).",
"pattern": "^\\d+[KMG]?$"
},
Expand Down
2 changes: 1 addition & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export async function activate(context: vscode.ExtensionContext): Promise<void>
const conf = vscode.workspace.getConfiguration('php');
const executablePath = conf.get<string>('executablePath') || 'php';

const memoryLimit = conf.get<string>('memoryLimit') || '4G';
const memoryLimit = conf.get<string>('memoryLimit') || '4095M';

if (memoryLimit !== '-1' && !/^\d+[KMG]?$/.exec(memoryLimit)) {
const selected = await vscode.window.showErrorMessage(
Expand Down

0 comments on commit 79edb58

Please sign in to comment.