[PATCH 1/7] Xserver-spec: Update Memory Management functions
Alan Coopersmith
alan.coopersmith at oracle.com
Sun Nov 28 00:00:25 PST 2010
Xalloc, Xrealloc, & Xfree are deprecated now
ALLOCATE_LOCAL is removed due to stack overflow issues
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
doc/xml/Xserver-spec.xml | 14 +++-----------
1 files changed, 3 insertions(+), 11 deletions(-)
diff --git a/doc/xml/Xserver-spec.xml b/doc/xml/Xserver-spec.xml
index ae15346..dbf0883 100644
--- a/doc/xml/Xserver-spec.xml
+++ b/doc/xml/Xserver-spec.xml
@@ -1215,20 +1215,12 @@ library is contained in dix/dixfonts.c
<title>Memory Management</title>
<para>
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.
</para>
<para>
-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.
-</para>
-<para>
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
--
1.7.3.2
More information about the xorg-devel
mailing list