VideoMemory in widget

How can I get the value of the video memory used to add it to the widget? I want to see the video bar in the game.
For example, like in GTA 5
image