It seems --max_old_space_size does not work anymore.
I tested on Ubuntu 22.04 (Version 106.0.5249.119) where it did nothing, and I found this thread on Google Support saying it was removed in Chrome 104.
On Ubuntu 23.04, it still does not work but the limit seems to be above 4Gio at least on my laptop.
Here is how to check it for yourself:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="Author" content="Laurent LYAUDET">
<meta name="Publisher" content="Laurent LYAUDET">
<meta name="Description"
content="Check if Chrome still limits tab memory">
<meta name="Keywords"
content="debug Chrome">
<title>All your memory are belong to us! XD</title>
</head>
<body>
<h1>Check if Chrome still limits tab memory</h1>
<p>
Step 1: Open Chrome with command line in incognito mode
to avoid messing with your profile (adapt this line to your OS):
<pre>
/usr/bin/google-chrome-stable --incognito --max_old_space_size=4096
</pre>
</p>
<p>
Step 2: Open Chrome Task Manager to check your memory (Menu > More Tools > Task manager)
</p>
<p>
Step 3: Look at how much RAM used it crashes.
</p>
<p>
Step 4: Repeat from step 1 with --max_old_space_size=1024.
Currently "Version 112.0.5615.165 (Build officiel) (64 bits)",
max_old_space_size seems to do nothing.
Webpage loads fine with both if fine_tune_me = 400000.
Webpage crashes with both if fine_tune_me = 1000000.
</p>
<script>
// let fine_tune_me = 400000; // This value should be ok if you have enough RAM.
let fine_tune_me = 1000000; // This value should crash.
document.addEventListener("DOMContentLoaded", function () {
for(let i = 0; i < fine_tune_me; ++i){
let myTextArea = document.createElement("textarea");
myTextArea.textContent = "All your memory are belong to us!";
document.body.appendChild(myTextArea);
}
});
</script>
</body>
</html>