Does anyone know a good place to start of one wanted to understand how X11 handles (de)allocation and generally manages the default framebuffer? I came across an SO question that lead me to investigate a simple test case, but the results were very unintuitive.
I really don’t think that those will help. The question appears to relate to “internals” which are up to the implementation. For the X.org server, it might be handled by the common server code, or it might even be up to individual drivers, or it might be something for which the server provides a default implementation which individual drivers can override.
Unless it relates to behaviour which applications typically need to know (in which case, it should be specified as part of X11 or GLX), the question would probably be better addressed to a X.org or Mesa forum or mailing list.