Update doc/efun/ aus Driversourcen.
Manpages der efuns aktualisiert, neue Manpages hinzugefuegt.
Change-Id: I7cc91684269ff56d1aef47d5c5e7c87f7fd531dc
diff --git a/doc/efun/garbage_collection b/doc/efun/garbage_collection
index 86a87c4..4caa2df 100644
--- a/doc/efun/garbage_collection
+++ b/doc/efun/garbage_collection
@@ -1,29 +1,55 @@
-GESCHUETZT
SYNOPSIS
void garbage_collection()
void garbage_collection(string filename)
+ void garbage_collection(string filename, int flag)
-BESCHREIBUNG
- Befiehlt dem Treiber, nach Ende der aktuellen Ausfuehrung eine
- Garbage Collection zu beginnen. Je nachdem, welcher Memory Allocator
- verwendet wird, ist die Garbage Collection mehr oder weniger
- gruendlich.
+DESCRIPTION
+ Tell the parser to initiate a garbage collection after the
+ current execution ended. Depending on the type of memory
+ allocator used, this GC is more less thorough.
- Wird der smalloc Memory Allocator verwendet, erzeugt GC einen Output
- in einem Logfile. Der Standardname fuer das Logfile wird beim
- Programmstart festgelegt, kann aber zur Laufzeit veraendert werden,
- wenn das Argument <filename> angegeben ist. Der Log-Output wird in
- diesem Fall an das bezeichnete Logfile angefuegt.
+ If the 'smalloc' memory allocator is used, the GC produces
+ output to a log file. The default name of the log file is
+ specified at program start, but can be modified at runtime:
- Fuer andere Memory Allocators erzeugt garbage_collection() keinen
- Output. Ein allfaelliges Argument <filename> wird ignoriert.
+ With the <filename> argument a log file for the GC output
+ different from the default log file can be specified.
- Diese efun verursacht den Aufruf von privilege_violation().
+ If <flag> is not given or 0, the output from the next
+ and only the next GC will go into the log file. If the file
+ already exists, the new output will be appended.
-GESCHICHTE
- LDMud 3.2.9 fuehrte das Argument <filename> ein.
- LDMud 3.3.209 fuehrte das Argument <flag> ein.
- LDMud 3.5.0 machte die efun privilegiert.
+ If <flag> is 1, the <filename> will be used as the new
+ default log file for all following GCs. If the file already
+ exists, it will be overwritten from the start.
-SIEHE AUCH
+ If a different memory allocator is used, the GC does not produce
+ output and the <filename> and <flag> arguments are ignored.
+
+ Calling this efun causes a privilege_violation.
+
+EXAMPLES
+ garbage_collection()
+ [ GC occurs -> logs into default file ]
+
+ garbage_collection("/GCLOG")
+ [ GC occurs -> logs into "/GCLOG" ]
+
+ garbage_collection("/GCLOG", 1)
+ [ GC occurs -> logs into "/GCLOG", sets default log to "/GCLOG" ]
+
+ garbage_collection("/GCLOG")
+ garbage_collection("/GCLOG2")
+ [ GC occurs -> logs into "/GCLOG" ]
+
+ garbage_collection("/GCLOG", 1)
+ garbage_collection("/GCLOG2")
+ [ GC occurs -> logs into "/GCLOG2", sets default log to "/GCLOG" ]
+
+HISTORY
+ LDMud 3.2.9 added the <filename> argument.
+ LDMud 3.3.209 added the <flag> argument.
+ LDMUd 3.5.0 made the efun privileged.
+
+SEE ALSO
rusage(E), valid_write(M), privilege_violation(M)