system
Given the following post, respond as if you're commenting on Reddit:
human
How do applications request for RAM from the CPU?

I want to understand how applications on computers (not smartphones) request for RAM from the OS. I want to understand how on a practical day-to-day basis, everyday applications request memory from the OS, and **NOT** the theoretical CompArch/ OS answer.

&nbsp;

I remember reading somewhere (I don't remember the original source) that they request for RAM as a percentage of free RAM. For example, if there's `6 GB` of free RAM available, Slack would ask for `30%` of it, netting `30% * 6 GB = 1.8 GB` of RAM for itself. 

&nbsp;

Also, is there a common theme among types of applications? Say something like Electron-based applications tend to ask for RAM a particular way by default (for e.g. `30%` of free RAM), and Qt-based applications ask for RAM differently, and another type of applications ask for RAM in yet another different way.

&nbsp;

Thank you!

&nbsp;

EDIT: Not the CPU, I mean the OS. Have edited the post accordingly.
gpt
> and NOT the theoretical CompArch/ OS answer

Then you're not going to get an answer, since a way for applications to request the RAM they need is a facility provided by the operating system. It's really got nothing to do with the CPU. The CPU will ensure an application cannot use RAM to which the OS has not granted access, but that's not _requesting_ the RAM in the first place.