| Newsgroups |
gmane.comp.xfree86.forum |
| Message-ID |
<[email protected]> |
>
> Is it possible to collect memory allocated by the X Server on behalf of
> some client? Like a malloc-zone. When a client disconnects, one could
> then simply deallocate the entire zone.
>
> Presumably, such a zone could be a mmap region which is dubdivided into
> mallocs related to a certain client.
>
> I don't know how feasible this is, one would have to keep track of
> which memory was allocated for whom. However, I feel it could improve
> VM locality of reference and simplify garbage collection quite a bit.
>
> I believe NeXTSTEP had something like this, too.
>
It isn't clear this is feasible with X. While by default, resources
are associated with the client that created them, there are circumstances
where this does not remain true. (e.g. see the SaveSet mechanism in
the protocol).
It is worth some additional thought, however.
Note that this, if possible, would aid cleanup after a single client
exits, but doesn't help in compacting use of long lived clients, which
might be feasible for pixmaps with an appropriate garbage collector.
- Jim
--
Jim Gettys
Cambridge Research Laboratory
HP Labs, Hewlett-Packard Company
[email protected]