From 922806a5aa6eafc432d6787495b475aaa3f1790d Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sat, 27 Nov 2010 00:14:51 -0800 Subject: Xserver-spec: Update Memory Management functions Xalloc, Xrealloc, & Xfree are deprecated now ALLOCATE_LOCAL is removed due to stack overflow issues Signed-off-by: Alan Coopersmith Reviewed-by: Julien Cristau Reviewed-by: Jeremy Huddleston --- doc/xml/Xserver-spec.xml | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/doc/xml/Xserver-spec.xml b/doc/xml/Xserver-spec.xml index ae15346f7..dbf088304 100644 --- a/doc/xml/Xserver-spec.xml +++ b/doc/xml/Xserver-spec.xml @@ -1215,20 +1215,12 @@ library is contained in dix/dixfonts.c Memory Management Memory management is based on functions in the C runtime library. -Xalloc(), Xrealloc(), and Xfree() work just like malloc(), realloc(), -and free(), except that you can pass a null pointer to Xrealloc() to -have it allocate anew or pass a null pointer to Xfree() and nothing -will happen. The versions in the sample server also do some checking -that is useful for debugging. Consult a C runtime library reference +Xalloc(), Xrealloc(), and Xfree() are deprecated aliases for malloc(), +realloc(), and free(), and you should simply call the C library functions +directly. Consult a C runtime library reference manual for more details. -The macros ALLOCATE_LOCAL and DEALLOCATE_LOCAL are provided in -Xserver/include/os.h. These are useful if your compiler supports -alloca() (or some method of allocating memory from the stack); and are -defined appropriately on systems which support it. - - Treat memory allocation carefully in your implementation. Memory leaks can be very hard to find and are frustrating to a user. An X server could be running for days or weeks without being reset, just -- cgit v1.2.3