S
S
sergesamas2018-12-20 14:52:02
Operating Systems
sergesamas, 2018-12-20 14:52:02

How to see when a variable is in the swap file and when in RAM?

I realized that you need to get the memory occupied by the process of the program in which the variable is located. But the fact is that I do not understand how this can be implemented in c ++.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Rsa97, 2018-12-20
@sergesamas

From the program's point of view, all variables are in RAM. Unloading to the paging file is handled by the operating system transparently for application applications.

W
Wexter, 2018-12-21
@Wexter

if you do not use the variable - it is in the swap file, if you access it - it is moved to RAM

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question