aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/info/chap/error-reporting.texinfo6
-rw-r--r--doc/info/chap/language-facilities.texinfo67
-rw-r--r--doc/info/chap/memory-allocation.texinfo181
3 files changed, 254 insertions, 0 deletions
diff --git a/doc/info/chap/error-reporting.texinfo b/doc/info/chap/error-reporting.texinfo
index ef7e81b..070e1bc 100644
--- a/doc/info/chap/error-reporting.texinfo
+++ b/doc/info/chap/error-reporting.texinfo
@@ -880,5 +880,11 @@ than the location and @code{error_string} should
be printed. It is followed by the formatting-arguments.
@end table
+@ifnottex
+Etymology: (@command{slibc})-enhancement of (@code{perror}).
+@end ifnottex
+@iftex
+Etymology: @b{slibc}-enhancement of @b{perror}.
+@end iftex
@end table
diff --git a/doc/info/chap/language-facilities.texinfo b/doc/info/chap/language-facilities.texinfo
index fe27446..61e74eb 100644
--- a/doc/info/chap/language-facilities.texinfo
+++ b/doc/info/chap/language-facilities.texinfo
@@ -112,6 +112,13 @@ is stored as 1, to avoid integer overflows,
that may occur when using @code{int}, and
not using @code{!!} when casting to @code{int}.
+@ifnottex
+Etymology: (Bool)ean.
+@end ifnottex
+@iftex
+Etymology: @b{Bool}ean.
+@end iftex
+
@item true
Has the value 1, and represents a true value.
@@ -197,6 +204,17 @@ should have the alignment of the type @code{TYPE}@.
The function call @code{alignof(TYPE)}, returns
the alignment of the type @code{TYPE}@.
+@ifnottex
+Etymology of @code{alignas}: (Align as) type.
+
+Etymology of @code{alignof}: (Align)ment (of) type.
+@end ifnottex
+@iftex
+Etymology of @code{alignas}: @b{Align as} type.
+
+Etymology of @code{alignof}: @b{Align}ment @b{of} type.
+@end iftex
+
@node Member offsets
@@ -233,6 +251,13 @@ structure has offset 0 and size 16. 0 + 16 = 16.
@code{offsetof} is also known to be problematic in C++,
because C++ supports redefining operators.
+@ifnottex
+Etymology: Address-(offset of) member.
+@end ifnottex
+@iftex
+Etymology: Address-@b{offset of} member.
+@end iftex
+
@node Variadic functions
@@ -256,16 +281,37 @@ data type and the three macro functions.
Data type that is used to traverse the non-fixed
arguments in a variadic function.
+@ifnottex
+Etymology: (V)ariadic (a)rguments-subsystem: argument-(list).
+@end ifnottex
+@iftex
+Etymology: @b{V}ariadic @b{a}rguments-subsystem: argument-@b{list}.
+@end iftex
+
@item void va_start(va_list @i{list}, @i{last})
Initialises a @code{va_list}, specified by the
first argument. The second argument must be the
last fixed argument.
+@ifnottex
+Etymology: (V)ariadic (a)rguments-subsystem: (start) of use.
+@end ifnottex
+@iftex
+Etymology: @b{V}ariadic @b{a}rguments-subsystem: @b{start} of use.
+@end iftex
+
@item void va_end(va_list @i{list})
Deallocates resources that was allocated by
@code{va_start}. The specified list, must not
be used after calling this macro.
+@ifnottex
+Etymology: (V)ariadic (a)rguments-subsystem: (end) of use.
+@end ifnottex
+@iftex
+Etymology: @b{V}ariadic @b{a}rguments-subsystem: @b{end} of use.
+@end iftex
+
@item @i{type} va_arg(va_list @i{list}, @i{type})
Returns the next argument, the specified type
must have the same width the argument hade in
@@ -276,6 +322,13 @@ or @code{short int} (or variant thereof), the
corresponding call to @code{va_arg} shall
specify @code{int} or a variant thereof (with
the same width as @code{int}.)
+
+@ifnottex
+Etymology: (V)ariadic (a)rguments-subsystem: get (arg)ument.
+@end ifnottex
+@iftex
+Etymology: @b{V}ariadic @b{a}rguments-subsystem: get @b{arg}ument.
+@end iftex
@end table
@fnindex va_copy
@@ -299,6 +352,13 @@ void fun(int arg, ...)
@}
@end example
+@ifnottex
+Etymology: (V)ariadic (a)rguments-subsystem: (copy) list.
+@end ifnottex
+@iftex
+Etymology: @b{V}ariadic @b{a}rguments-subsystem: @b{copy} list.
+@end iftex
+
Some systems define @code{va_start} and @code{va_end}
with a @code{@{} in @code{va_start} and a @code{@}}
in @code{va_end}. Therefore, they are declared this
@@ -454,3 +514,10 @@ Note that @code{NULL} is genuinely harmful in C++,
but excessive use of C++, and especially it
features, is harmful too.
+@ifnottex
+Etymology: Pointer with numerical value (0).
+@end ifnottex
+@iftex
+Etymology: Pointer with numerical value @b{0}.
+@end iftex
+
diff --git a/doc/info/chap/memory-allocation.texinfo b/doc/info/chap/memory-allocation.texinfo
index 1b7c778..eddefd0 100644
--- a/doc/info/chap/memory-allocation.texinfo
+++ b/doc/info/chap/memory-allocation.texinfo
@@ -410,6 +410,13 @@ for the aligment of all pointers it returns.
you want the pointer to be unaligned, call
@code{memalign(1, n)}.
+@ifnottex
+Etymology: (M)emory (alloc)ation.
+@end ifnottex
+@iftex
+Etymology: @b{M}emory @b{alloc}ation.
+@end iftex
+
@item void* calloc(size_t count, size_t size)
@fnindex calloc
@cpindex Memory allocation without uninitialisation
@@ -427,6 +434,13 @@ p = malloc(a * b);
memset(p, 0, a * b);
@end example
+@ifnottex
+Etymology: (C)leared memory (alloc)ation.
+@end ifnottex
+@iftex
+Etymology: @b{C}leared memory @b{alloc}ation.
+@end iftex
+
@item void free(void* ptr)
@fnindex free
@cpindex Deallocate memory
@@ -459,6 +473,13 @@ statically allocated arrays, which must not
be deallocated, or dynamically allocated
memory, which should be deallocated to avoid
memory leaks.
+
+@ifnottex
+Etymology: (Free) allocated memory.
+@end ifnottex
+@iftex
+Etymology: @b{Free} allocated memory.
+@end iftex
@end table
@file{<malloc.h>} also includes four unportable
@@ -473,6 +494,13 @@ does not overflow, @code{calloc(a, b)} is identical
to @code{zalloc(a * b)}. @code{zalloc} is a
@command{klibc} extension.
+@ifnottex
+Etymology: (Z)eroed memory (alloc)ation.
+@end ifnottex
+@iftex
+Etymology: @b{Z}eroed memory @b{alloc}ation.
+@end iftex
+
@item void* mallocz(size_t size, int clear)
@fnindex mallocz
This function is similar to @code{malloc}. However,
@@ -485,6 +513,13 @@ is non-zero, the allocated memory will be initialised.
This function is a Plan 9 from Bell Labs extension
and requires @code{_PLAN9_SOURCE}.
+@ifnottex
+Etymology: (M)emory (alloc)ation with potential (z)eroing.
+@end ifnottex
+@iftex
+Etymology: @b{M}emory @b{alloc}ation with potential @b{z}eroing.
+@end iftex
+
@item void cfree(void* ptr, ...)
@fnindex cfree
This function is an obsolete function provided
@@ -512,6 +547,13 @@ function @code{free}.
This function is a @sc{GNU} extension and requires
@code{_GNU_SOURCE}.
+
+@ifnottex
+Etymology: (@code{malloc})-subsystem: user-(usable size) of allocation.
+@end ifnottex
+@iftex
+Etymology: @b{malloc}-subsystem: user-@b{usable size} of allocation.
+@end iftex
@end table
@hfindex slibc-alloc.h
@@ -533,6 +575,13 @@ is guaranteed not to clear the memory. However,
the operating system kernel may still clear the
memory.
+@ifnottex
+Etymology: (Fast) variant of (@code{free}).
+@end ifnottex
+@iftex
+Etymology: @b{Fast} variant of @b{free}.
+@end iftex
+
@item void secure_free(void* ptr)
@fnindex secure_free
@cpindex Deallocate memory
@@ -540,6 +589,13 @@ memory.
This function is similar to @code{free}, but it
is guaranteed that the memory is clear.
+@ifnottex
+Etymology: (Secure) variant of (@code{free}).
+@end ifnottex
+@iftex
+Etymology: @b{Secure} variant of @b{free}.
+@end iftex
+
@item void FAST_FREE(void* ptr)
@fnindex FAST_FREE
@cpindex Deallocate memory
@@ -548,6 +604,13 @@ This clears deallocates a pointer with
@code{fast_free}, and sets @code{ptr} to
@code{NULL}.
+@ifnottex
+Etymology: Macro version of (@code{fast_free}).
+@end ifnottex
+@iftex
+Etymology: Macro version of @b{fast_free}.
+@end iftex
+
@item void SECURE_FREE(void* ptr)
@fnindex SECURE_FREE
@cpindex Deallocate memory
@@ -556,6 +619,13 @@ This clears deallocates a pointer with
@code{secure_free}, and sets @code{ptr} to
@code{NULL}.
+@ifnottex
+Etymology: Macro version of (@code{secure_free}).
+@end ifnottex
+@iftex
+Etymology: Macro version of @b{secure_free}.
+@end iftex
+
@item size_t allocsize(void* ptr)
@fnindex allocsize
@cpindex Retrieve allocation size
@@ -567,6 +637,13 @@ function @code{free}.
@code{allocsize(malloc(n))} returns @code{n}
(and allocates memory in the process.)
+
+@ifnottex
+Etymology: Memory (alloc)ation (size).
+@end ifnottex
+@iftex
+Etymology: Memory @b{alloc}ation @b{size}.
+@end iftex
@end table
@@ -615,6 +692,13 @@ In @code{slibc}, the alignment may be lost.
This behaviour has been chosen because aligned
memory allocation is uncommon in practice.
+@ifnottex
+Etymology: (Mem)ory (align)ment.
+@end ifnottex
+@iftex
+Etymology: @b{Mem}ory @b{align}ment.
+@end iftex
+
@item int posix_memalign(void** ptrptr, size_t boundary, size_t size)
@fnindex posix_memalign
This function is similar to @code{malloc},
@@ -668,6 +752,13 @@ memory allocation is uncommon in practice.
is not a multiple of @code{sizeof(void*)}, and
@code{errno} is unspecified.
+@ifnottex
+Etymology: (@sc{POSIX})-extension: (mem)ory alignment.
+@end ifnottex
+@iftex
+Etymology: @b{POSIX}-extension: @b{mem}ory alignment.
+@end iftex
+
@item void* valloc(size_t size)
@fnindex valloc
This function is similar to @code{memalign}.
@@ -699,6 +790,13 @@ In @code{slibc}, the alignment may be lost.
This behaviour has been chosen because aligned
memory allocation is uncommon in practice.
+@ifnottex
+Etymology: Whole-(v)irtual-memory-page aligned memory (alloc)ation.
+@end ifnottex
+@iftex
+Etymology: Whole-@b{v}irtual-memory-page aligned memory @b{alloc}ation.
+@end iftex
+
@item void* pvalloc(size_t size)
@fnindex pvalloc
This function is almost identical to
@@ -732,6 +830,13 @@ In @code{slibc}, the alignment may be lost.
This behaviour has been chosen because aligned
memory allocation is uncommon in practice.
+@ifnottex
+Etymology: Whole-(p)age-allocation variant of (@code{valloc}).
+@end ifnottex
+@iftex
+Etymology: Whole-@b{p}age-allocation variant of @b{valloc}.
+@end iftex
+
@item void* aligned_alloc(size_t boundary, size_t size)
@fnindex aligned_alloc
This function is identical to @code{memalign},
@@ -752,6 +857,13 @@ A recommended practice, to align pointers is:
@example
p = aligned_alloc(sizeof(*p), n)
@end example
+
+@ifnottex
+Etymology: (Align)ed memory (alloc)ation.
+@end ifnottex
+@iftex
+Etymology: @b{Align}ed memory @b{alloc}ation.
+@end iftex
@end table
@@ -811,6 +923,13 @@ or @code{REMEMALIGN_MEMCPY}, the function fails with
Upon successful completion, @code{errno} is set to zero
if @code{NULL} is returned.
+@ifnottex
+Etymology: (Re)allocate (mem)ory and (align).
+@end ifnottex
+@iftex
+Etymology: @b{Re}allocate @b{mem}ory and @b{align}.
+@end iftex
+
@item void* naive_realloc(void* ptr, size_t boundary, size_t size)
This function is discussed in @ref{Resizing memory allocations}.
@@ -891,6 +1010,13 @@ size_t psize, new_size;
psize = new_size;
@}
@end example
+
+@ifnottex
+Etymology: Memory (realloc)ation.
+@end ifnottex
+@iftex
+Etymology: Memory @b{realloc}ation.
+@end iftex
@end table
Note that if @code{ptr == NULL && size == 0},
@@ -922,6 +1048,13 @@ allocation is created, and zero-initialises the
newly available memory when the allocation has
grown.
+@ifnottex
+Etymology: (C)lear and (realloc)ate memory.
+@end ifnottex
+@iftex
+Etymology: @b{C}lear and @b{realloc}ate memory.
+@end iftex
+
@item void* fast_realloc(void* ptr, size_t size)
@fnindex fast_realloc
This function is similar to @code{realloc},
@@ -933,6 +1066,12 @@ memory when the allocation has grown. The
operating system kernel may still clear the
disowned memory area or the old allocation.
+@ifnottex
+Etymology: (Fast) variant of (@code{realloc}).
+@end ifnottex
+@iftex
+Etymology: @b{Fast} variant of @b{realloc}.
+@end iftex
@item void* secure_realloc(void* ptr, size_t size)
@fnindex secure_realloc
@@ -943,6 +1082,13 @@ allocation is created, but does not zero-initialise
the newly available memory when the allocation has
grown.
+@ifnottex
+Etymology: (Secure) variant of (@code{realloc}).
+@end ifnottex
+@iftex
+Etymology: @b{Secure} variant of @b{realloc}.
+@end iftex
+
@item void* custom_realloc(void* ptr, size_t size, int clear_old, int clear_new, int clear_free)
@fnindex custom_realloc
This function is similar to @code{realloc}, but
@@ -964,6 +1110,13 @@ disowned memory area or the old allocation, if
the parameters specifies that the memory should
not be cleared.
+@ifnottex
+Etymology: (Custom)isable variant of (@code{realloc}).
+@end ifnottex
+@iftex
+Etymology: @b{Custom}isable variant of @b{realloc}.
+@end iftex
+
@item void* extalloc(void* ptr, size_t size, enum extalloc_mode mode)
@fnindex extalloc
@tpindex extalloc_mode
@@ -981,6 +1134,13 @@ old memory --- disowned, or the old allocation --- if
@code{mode & EXTALLOC_CLEAR}. @code{EXTALLOC_MALLOC}
and @code{EXTALLOC_CLEAR} can be combined freely.
+@ifnottex
+Etymology: (Ext)end memory (alloc)ation.
+@end ifnottex
+@iftex
+Etymology: @b{Ext}end memory @b{alloc}ation.
+@end iftex
+
@item void* naive_realloc(void* ptr, size_t boundary, size_t size)
@fnindex naive_realloc
This is a naïve bare-bones version of @code{realloc},
@@ -1003,6 +1163,13 @@ If and only if, a new allocation is created, the
returned pointer's alignment will be @code{boundary}.
@end itemize
+@ifnottex
+Etymology: (Naïve) variant of (@code{realloc}).
+@end ifnottex
+@iftex
+Etymology: @b{Naïve} variant of @b{realloc}.
+@end iftex
+
@item void* naive_extalloc(void* ptr, size_t size)
@fnindex naive_extalloc
This is a naïve bare-bones version of @code{extalloc},
@@ -1012,6 +1179,13 @@ except it will return @code{NULL} with @code{errno} set to
zero, if it is not possible to perform the shrink or grow
without creating new pointer.
+@ifnottex
+Etymology: (Naïve) variant of (@code{extalloc}).
+@end ifnottex
+@iftex
+Etymology: @b{Naïve} variant of @b{extalloc}.
+@end iftex
+
@item void* falloc(void* ptr, size_t* ptrshift, size_t boundary, size_t old_size, size_t new_size, enum falloc_mode mode)
@fnindex falloc
@tpindex falloc_mode
@@ -1114,6 +1288,13 @@ is only copied over to the new allocation if
@code{mode & FALLOC_MEMCPY}. If
@code{(mode & FALLOC_INIT) && !(mode & FALLOC_MEMCPY)},
the entire allocation will be cleared.
+
+@ifnottex
+Etymology: (F)ast memory (alloc)ation.
+@end ifnottex
+@iftex
+Etymology: @b{F}ast memory @b{alloc}ation.
+@end iftex
@end table