diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2010-11-27 00:14:51 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2010-11-30 16:16:14 -0800 |
commit | 922806a5aa6eafc432d6787495b475aaa3f1790d (patch) | |
tree | b99b37c49b29d7f1f292a8671e5f76dfd36fafad /doc/xml | |
parent | 02449ee24b484c9fea501df5274d95a9f87cab23 (diff) |
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 <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Diffstat (limited to 'doc/xml')
-rw-r--r-- | 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 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 <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 |