Forum > General

Finishing thread does not release Virtual memory

<< < (2/5) > >>

jollytall:
It does not seem to work, and if I understand it correctly, it not even should. Isn't swapoff/swapon control the allocation of physical memory between RAM and Swap, while it has nothing to do with Virtual memory?

MarkMLl:

--- Quote from: jollytall on January 11, 2022, 03:25:41 pm ---It does not seem to work, and if I understand it correctly, it not even should. Isn't swapoff/swapon control the allocation of physical memory between RAM and Swap, while it has nothing to do with Virtual memory?

--- End quote ---

Swap is normally referred to as virtual memory, or are you talking about something different?

MarkMLl

BrunoK:
Maybe try using cmem and see how memory usage vary ?

Of course, no heaptrc possible.

jollytall:

--- Quote from: MarkMLl on January 11, 2022, 03:39:15 pm ---Swap is normally referred to as virtual memory, or are you talking about something different?
MarkMLl

--- End quote ---
Swap (or to be more precise Swap + RAM) is often referred as virtual memory. But this is not what Linux (e.g. in Top) calls Virtual memory. Nowadays VIRT can be much larger than the available physical memory including RAM and swap. I found a good description https://serverfault.com/questions/138427/what-does-virtual-memory-size-in-top-mean explaining how it can happen. Also https://man7.org/linux/man-pages/man1/top.1.html has a paragraph on Linux memory types.

The problem to reserve a virtual memory space still reserves (I think) an entry in the allocation table and so the table slowly grows, so over a longer period can cause OOM. (And also the peace of my mind not seeing a number growing permanently beyond any limit.)

jollytall:

--- Quote from: BrunoK on January 11, 2022, 03:41:35 pm ---Maybe try using cmem and see how memory usage vary ?

Of course, no heaptrc possible.

--- End quote ---
I tried adding cmem, but the VIRT usage grows just the same.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version