Wala pa ang pahinang ito sa inyong wika. Binabasa ninyo ang tekstong Ingles.
Blog
An exact memory number gives a profile away: a hundred steps
Ang ARMANOS team6 min
What a site learns about your memory
Any script on the page open in front of you reads the ceiling on the memory it may hold. Nothing asks you for permission and nothing on the page shows that it happened.
The value matters to the site for one reason: it does not describe the page. It is arithmetic done on the memory of the machine underneath.
A hundred steps and nothing between
The rounded answer is not rounding by eye but a place in a fixed table. The table sits inside the engine itself, and it holds exactly a hundred steps.
Each step keeps three significant digits, and neighbours stand about six percent apart. A number that falls between two of them never reaches the site as it was.
| What the engine's table holds | Value |
|---|---|
| Steps in the table | 100 |
| Lowest and highest step | 10 000 000 and 3 760 000 000 |
| Significant digits kept | 3 |
| Distance between neighbours | about 6 percent |
| Smallest and largest gap | 600 000 and 220 000 000 |
Why an exact number is riskier than a step
One step is handed to everyone whose real ceiling lands inside it. At the top of the table that band is 220 000 000 bytes wide, and very different machines answer identically.
An exact byte count works the other way round. It is the arithmetic of one machine and one build, it stays the same from visit to visit, and that is the kind of value a site collects.
77 of the hundred steps lie below a billion bytes. The table is finer at the bottom than at the top, so a small machine is described more closely than a large one.
What the number is made of
The ceiling is two parts added together: a long lived part sized from memory, and a short lived part that comes from the build.
A desktop profile is owed half of its declared memory as the long lived part and a phone profile a quarter. Neither one goes below 256 MB or above 4 GB.
What changes in your profile and what stays
Your profile replaces only the long lived part, and the number the declared memory calls for takes its place. The short lived part rides along as it is: it belongs to the build, and writing it by hand would make a fresh tell out of nothing.
When the declared memory already agrees with the machine underneath, your profile leaves the value alone.
- 1
Declared memory sets the long part
Half of it on a desktop profile and a quarter on a phone.
- 2
The short part rides along as it is
It comes from the build and stays as it was.
- 3
The shape of the answer stays the same
A step stays a step and an exact count stays exact.
What the finished browser shows
You can check the number yourself: the finished browser gives you and the site the same answer. On the Windows build it came back as 4 192 MB against the 4 096 MB of long lived part the profile was owed.
The difference is the short lived part of that build. That number is not one of the hundred steps either, which is the browser answering the second way.
Both shapes of the answer are normal
Bands are narrow at the bottom and wide at the top
There are a hundred steps, and the bands between them differ in width. At the bottom of the table a band is six hundred thousand bytes, at the top two hundred and twenty million.
So a weak machine gets an almost exact answer while a strong one is coarsened heavily.
That is deliberate: values on weak machines sit closer together, and a coarse step there would say more about you than an exact number.
How much memory a profile claims
The memory figure itself is drawn from the profile's own seed, and there are two values: four gigabytes and eight. A desktop and a phone profile share the same choice.
The long part of the heap is counted from it: half for a desktop profile, a quarter for a phone one. Neither goes below two hundred and fifty-six megabytes or above four gigabytes.
Why two profiles answer differently
Memory falls to a profile on its own draw, apart from the graphics card and the screen. So two of your profiles on one machine usually name different figures.
A match here is no trouble: four gigabytes is an ordinary number and plenty of people carry it. The worrying case is the opposite, when every profile answers the same.
What a stock browser shows without our patch
On the Windows build a stock browser answered four thousand one hundred and ninety-two megabytes against the four thousand and ninety-six given to the profile. The gap is small, and it is exactly the one the engine itself produces.
We count that as a failed row rather than a detail. The measurement sits in the acceptance log, and the number for the site is taken from there rather than typed by hand.
How that step catches a fake
One comparison is enough for a platform: an answer that lands on no step did not come from a browser. A stock browser always puts the figure on a step, so a value between steps is a foreign hand.
That is exactly why we do not round in our own way or invent tidy numbers. We put the answer on the very step the browser itself would have chosen.
Where the table of steps comes from
The table is taken from the engine's own sources and sits with us as a file of a hundred rows. The first step is ten million bytes, the last three billion seven hundred and sixty million.
Anything above the last step did not come from the table. If your browser named a larger figure, it counted it itself rather than taking it from this row.
How to read your own
In a Chromium browser, open the developer console, read performance.memory.jsHeapSizeLimit and divide it by 1024 twice for megabytes.
You can recognise a rounded answer at once: three digits and then zeros all the way down. Anything above 3 760 000 000 never came out of the table.
What this does not claim
- It does not claim that a ceiling in agreement makes a profile safe. One disagreement out of many is removed, and behaviour, payment details and the history of an account stay untouched by any browser.
- It does not claim that every site reads this. The property is not part of the web standard, and not every browser offers it at all.
- The short lived part is left alone, so the ceiling never matches the declared memory to the byte. The self-test asks for agreement within a margin instead of an exact number.
- The hundred steps were computed on the engine generation shipped today. A later engine can move the table, which is why the file is recomputed rather than trusted.
Where you can see this yourself
Every number above comes out of a file you can open and run again.
- The hundred steps are computed by a verbatim copy of the engine source
- docs/замеры/ступени-памяти-153.cc · docs/замеры/ступени-памяти-153.txt
- The table is recompiled and compared step by step
- packages/shared/test/ступени-памяти-как-у-движка.js
- The ceiling a profile is owed is arithmetic in one place
- packages/shared/src/index.js
- The engine replaces the long lived part and nothing else
- engine/patches/armanos-fp-0012.newfiles.tgz · engine/patches/armanos-fp-0014-memory.diff
- The reading taken on the built engine
- docs/замеры/приёмка-windows-02-09.json
Questions
- Why round the number at all?
- A byte count is close to unique for one machine and one build, while a step is shared by a great many. The rounding sits in the engine itself and works the same way for everyone.
- Is four gigabytes ever shown?
- Not by the rounded answer: the highest step is 3 760 000 000 and the table ends there. An exact count can be higher, and on the Windows build it was.
- Does the declared memory move between launches?
- No. It comes from the profile seed, so the same profile answers the same way on any machine it opens on.
- Can a site tell the value was adjusted?
- It reads one ordinary number and cannot see what produced it. What it can see is whether that number agrees with the memory the profile declares.
- Does a proxy change any of this?
- No. The address arrives from elsewhere, and this number is produced on the machine in front of you.
Next to this
Device memory
The other memory number a site reads and what it is worth.
V8
The part of a browser that runs scripts and owns the heap.
What a site reads
The whole set of answers a visit hands over.
The engine we build
What is changed inside the browser instead of on the page.
Free fingerprint check
12 values read in your browser, with nothing sent anywhere.
See your own fingerprint
The check reads 12 values in your browser and sends none of them anywhere. The heap ceiling is not among them.