Skip to content

Commit

Permalink
Minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
SinclaM committed Feb 10, 2024
1 parent 391728a commit 72b4d9e
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,19 +106,13 @@
};

const findMaximumMemorySize = () => {
let maximum = initialMemorySize;

while (maximum < 65536 && allowed(initialMemorySize, maximum)) {
maximum = Math.min(maximum * 2, 65536);
}

let left = initialMemorySize;
let right = maximum;
let right = 65536;

while (left < right) {
const mid = Math.ceil((left + right) / 2);

if (allowed(initialMemorySize, mid)) {
if (allowed(mid)) {
left = mid;
} else {
right = mid - 1;
Expand Down

0 comments on commit 72b4d9e

Please sign in to comment.