comparison man/internals/internals.texi @ 298:70ad99077275 r21-0b47

Import from CVS: tag r21-0b47
author cvs
date Mon, 13 Aug 2007 10:39:40 +0200
parents c42ec1d1cded
children afd57c14dfc8
comparison
equal deleted inserted replaced
297:deca3c1083ac 298:70ad99077275
1693 much constant data as possible into initialized variables (in 1693 much constant data as possible into initialized variables (in
1694 particular, into what's called the @dfn{pure space} -- see below) during 1694 particular, into what's called the @dfn{pure space} -- see below) during
1695 the @file{temacs} phase. 1695 the @file{temacs} phase.
1696 1696
1697 @cindex copy-on-write 1697 @cindex copy-on-write
1698 @strong{Note:} This kludge only works on a few systems nowadays, and is 1698 @strong{Please note:} This kludge only works on a few systems
1699 rapidly becoming irrelevant because most modern operating systems provide 1699 nowadays, and is rapidly becoming irrelevant because most modern
1700 @dfn{copy-on-write} semantics. All data is initially shared between 1700 operating systems provide @dfn{copy-on-write} semantics. All data is
1701 processes, and a private copy is automatically made (on a page-by-page 1701 initially shared between processes, and a private copy is automatically
1702 basis) when a process first attempts to write to a page of memory. 1702 made (on a page-by-page basis) when a process first attempts to write to
1703 a page of memory.
1703 1704
1704 Formerly, there was a requirement that static variables not be 1705 Formerly, there was a requirement that static variables not be
1705 declared inside of functions. This had to do with another hack along 1706 declared inside of functions. This had to do with another hack along
1706 the same vein as what was just described: old USG systems put 1707 the same vein as what was just described: old USG systems put
1707 statically-declared variables in the initialized data space, so those 1708 statically-declared variables in the initialized data space, so those
1982 However, it's possible that a naughty user could do something like 1983 However, it's possible that a naughty user could do something like
1983 uninterning the symbol out of @code{obarray} or even setting 1984 uninterning the symbol out of @code{obarray} or even setting
1984 @code{obarray} to a different value [although this is likely to make 1985 @code{obarray} to a different value [although this is likely to make
1985 XEmacs crash!].) 1986 XEmacs crash!].)
1986 1987
1987 @strong{Note:} It is potentially deadly if you declare a @samp{Q...} 1988 @strong{Please note:} It is potentially deadly if you declare a
1988 variable in two different modules. The two calls to @code{defsymbol()} 1989 @samp{Q...} variable in two different modules. The two calls to
1989 are no problem, but some linkers will complain about multiply-defined 1990 @code{defsymbol()} are no problem, but some linkers will complain about
1990 symbols. The most insidious aspect of this is that often the link will 1991 multiply-defined symbols. The most insidious aspect of this is that
1991 succeed anyway, but then the resulting executable will sometimes crash 1992 often the link will succeed anyway, but then the resulting executable
1992 in obscure ways during certain operations! To avoid this problem, 1993 will sometimes crash in obscure ways during certain operations! To
1993 declare any symbols with common names (such as @code{text}) that are not 1994 avoid this problem, declare any symbols with common names (such as
1994 obviously associated with this particular module in the module 1995 @code{text}) that are not obviously associated with this particular
1995 @file{general.c}. 1996 module in the module @file{general.c}.
1996 1997
1997 Global variables whose names begin with @samp{V} are variables that 1998 Global variables whose names begin with @samp{V} are variables that
1998 contain Lisp objects. The convention here is that all global variables 1999 contain Lisp objects. The convention here is that all global variables
1999 of type @code{Lisp_Object} begin with @samp{V}, and all others don't 2000 of type @code{Lisp_Object} begin with @samp{V}, and all others don't
2000 (including integer and boolean variables that have Lisp 2001 (including integer and boolean variables that have Lisp
2046 commands: @code{quantify-start-recording-data}, 2047 commands: @code{quantify-start-recording-data},
2047 @code{quantify-stop-recording-data} and @code{quantify-clear-data}. 2048 @code{quantify-stop-recording-data} and @code{quantify-clear-data}.
2048 2049
2049 To get started debugging XEmacs, take a look at the @file{gdbinit} and 2050 To get started debugging XEmacs, take a look at the @file{gdbinit} and
2050 @file{dbxrc} files in the @file{src} directory. 2051 @file{dbxrc} files in the @file{src} directory.
2051 @xref{Q2.1.15: How to Debug an XEmacs problem with a debugger,,, 2052 @xref{Q2.1.15 - How to Debug an XEmacs problem with a debugger,,,
2052 xemacs-faq, XEmacs FAQ}. 2053 xemacs-faq, XEmacs FAQ}.
2053 2054
2054 2055
2055 Here are things to know when you create a new source file: 2056 Here are things to know when you create a new source file:
2056 2057
4324 an object to mark. (This can be used in lieu of calling 4325 an object to mark. (This can be used in lieu of calling
4325 @code{mark_object()} on the object, to reduce the recursion depth, and 4326 @code{mark_object()} on the object, to reduce the recursion depth, and
4326 consequently should be the most heavily nested sub-object, such as a 4327 consequently should be the most heavily nested sub-object, such as a
4327 long list.) 4328 long list.)
4328 4329
4329 @strong{Note}: When the mark method is called, garbage collection 4330 @strong{Please note:} When the mark method is called, garbage collection
4330 is in progress, and special precautions need to be taken 4331 is in progress, and special precautions need to be taken when accessing
4331 when accessing objects; see section (B) above. 4332 objects; see section (B) above.
4332 4333
4333 If your mark method does not need to do anything, it can be 4334 If your mark method does not need to do anything, it can be
4334 @code{NULL}. 4335 @code{NULL}.
4335 4336
4336 @item 4337 @item