What does .NET Memory "Gen X Heap Size" .NET performance counters measure exacly?

.net, garbage-collection, memory

Solution

Generation heap size measures the total allocated memory of the managed portion of all .NET objects currently in that particular garbage collection generation.

See this for more information.

Problem

Is that "the sum of all objects allocated" or is it "amount of memory allocated from the operating system for storing objects". Or is it something else? I think it is memory allocated from the OS, but would like a confirmation.

Original source