xserver: Cleaning up memory allocation functions and macros
keithp at keithp.com
Mon Apr 30 08:11:48 PDT 2007
On Mon, 2007-04-30 at 12:27 +0200, Egbert Eich wrote:
> Where have I suggested that *we* write/maintain our own
> malloc? I've just suggested to leave a door open for those
> who want to port X to environments with different
> needs and requirementes and make it possible to do so.
One significant reason the current codebase uses wrappers is to provide
a place where broken semantics can be repaired. In days of yore, malloc
differed in several key ways across systems; wrapping all calls provided
a place where these differing implementations could be made the same.
With all of our supported systems now providing POSIX semantics, it may
well be that this particular reason is gone.
An issue with the current situation is that other standard library
functions cannot be used (strdup, etc) as they 'may' use a different
allocator, so our code must wrap things like that as well. The question
is how far we must go in replacing the underlying system so we can
retain the ability to replace the allocator.
When it was required to make the system work on our supported platforms,
it had value for us. Now that it provides only convenience for other
people, we must weigh our own inconvenience and additional development
burden against hypothetical benefits for other developers.
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 189 bytes
Desc: This is a digitally signed message part
More information about the xorg