HOME

TheInfoList



OR:

The MIT Shared Memory Extension or MIT-SHM or XShm is an
X Window System The X Window System (X11, or simply X) is a windowing system for bitmap displays, common on Unix-like operating systems. X provides the basic framework for a GUI environment: drawing and moving windows on the display device and interacting wit ...
extension for exchange of image data between client and server using
shared memory In computer science, shared memory is memory that may be simultaneously accessed by multiple programs with an intent to provide communication among them or avoid redundant copies. Shared memory is an efficient means of passing data between progr ...
(usually ). The mechanism only works when both pieces are on the same computer. The basic capability provided is that of shared memory XImages. This is essentially a version of the ximage interface where the actual image data is stored in a
SysV Unix System V (pronounced: "System Five") is one of the first commercial versions of the Unix operating system. It was originally developed by AT&T and first released in 1983. Four major versions of System V were released, numbered 1, 2, 3, an ...
shared memory segment, and thus need not be transferred across the
socket Socket may refer to: Mechanics * Socket wrench, a type of wrench that uses separate, removable sockets to fit different sizes of nuts and bolts * Socket head screw, a screw (or bolt) with a cylindrical head containing a socket into which the hexag ...
to the X server. For large images, use of this facility can result in some real performance increases. Additionally, some implementations provide shared memory pixmaps. These are two-dimensional arrays of pixels in a format specified by the X server, where the image data is stored in the shared memory segment. Through use of shared memory pixmaps, it is possible to change the contents of these pixmaps without using any
Xlib Xlib (also known as libX11) is an X Window System protocol client library written in the C programming language. It contains functions for interacting with an X server. These functions allow programmers to write programs without knowing the d ...
routines at all. Shared memory pixmaps can only be supported when the X server can use regular virtual memory for pixmap data; if the pixmaps are stored in the on-board memory of graphics hardware, an application will not be able to share them with the server. In the 1.15 release of the
X.org server X.Org Server is the free and open-source implementation of the X Window System display server stewarded by the X.Org Foundation. Implementations of the client-side X Window System protocol exist in the form of ''X11 libraries'', which serve a ...
the MIT-SHM extension gains two additional requests: 'X_ShmAttachFd' and 'X_ShmCreateSegment', to be able to pass shared memory through file descriptors from client to server and from server to client, reducing the number of copy operations further.


References


External links


MIT-SHM(The MIT Shared Memory Extension)

shm.xml
- the
XCB XCB (''X protocol C-language Binding'') is a library implementing the client-side of the X11 display server protocol. XCB is written in the C programming language and distributed under the MIT License. The project was started in 2001 by B ...
protocol specification for the MIT-SHM extension X Window extensions {{graphics-software-stub