XC-MISC
More info
- Creator
- X Consortium
- Released
- 1994
- Type
- X extension
The small X11R6 extension that lets a client ask the server which resource IDs have become free again, so that a program running for weeks never runs out of numbers.
An X client invents the IDs for its own windows, pixmaps and cursors, drawing from a range handed out at connection time. That saves one round trip per object created, but it comes with a built-in ceiling: the range typically holds a couple of million values, and Xlib only ever counted upwards. When it hit the top, the library printed "resource ID allocation space exhausted" and terminated the program, even though almost all the old IDs had long since been released. Terminals and browsers that created and destroyed pixmaps by the thousand could get there over one long session.
XC-MISC, where XC stands for X Consortium, arrived with X11R6 in 1994 alongside the equally unglamorous BIG-REQUESTS. It has three requests: GetVersion, GetXIDRange, which returns a contiguous free interval, and GetXIDList, which returns up to a requested number of free IDs as a list. Xlib calls them automatically when its own range is used up, and XCB does the same inside xcb_generate_id, so no programmer ever sees the extension except as a line in xdpyinfo. A fair fate for an extension whose only job is to patch a design decision from 1987.