tags:

views:

22

answers:

1

Hi,

I have following this blog in setting Xvfb in my ubuntu environment:

http://corpocrat.com/2008/08/19/how-to-install-xvfb-x11-server-in-linux-server/

So I did this: Xvfb :1 -screen 0 800x600x24&

My question is does Xvfb only allocate memory during initialization? i.e. just enough for a display of 800x600x24? So as I have more and more programs (different programs or same program multiple times) display to the Xvfb , it does not allocate more memory?

Thank you.

A: 

No, Xvfb, like all X servers, will allocate memory as needed. The initial allocation of the screen frame buffer should not grow, unless you ask it to increase the screen size from 800x600, but the X server will still need to allocate memory for every client that connects and for various operations the clients do (allocating pixmaps, creating graphics contexts (GCs), loading fonts, etc.).

alanc
Thank you. If my gtk application uses cairo for drawing graphics and FreeType for font, Gtk for launching windows/dialogs, do those memory allocated by my application or Xvfb?
michael
Memory will be allocated in both your application and Xvfb for the windows, the font glyphs Xft sends to the server to render, and the pixmaps Cairo is drawing into. The amount of memory will be different in each, as they have to keep track of different parts of that data.
alanc