Changes in / [5e8d732:d6fb3c7]


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/user/user.tex

    r5e8d732 rd6fb3c7  
    1111%% Created On       : Wed Apr  6 14:53:29 2016
    1212%% Last Modified By : Peter A. Buhr
    13 %% Last Modified On : Tue May 30 09:08:16 2017
    14 %% Update Count     : 2072
     13%% Last Modified On : Tue May 30 11:45:46 2017
     14%% Update Count     : 2098
    1515%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1616
     
    51645164\Celeven prescribes the following standard header-files~\cite[\S~7.1.2]{C11} and \CFA adds to this list:
    51655165\begin{quote2}
    5166 \lstset{deletekeywords={float},deletekeywords=[2]{signal}}
     5166\lstset{deletekeywords={float}}
    51675167\begin{tabular}{@{}llll|l@{}}
    51685168\multicolumn{4}{c|}{C11} & \multicolumn{1}{c}{\CFA}             \\
     
    52385238
    52395239The storage-management routines extend their C equivalents by overloading, alternate names, providing shallow type-safety, and removing the need to specify the allocation size for non-array types.
     5240
     5241Storage management provides the following capabilities:
     5242\begin{description}
     5243\item[fill]
     5244after allocation the storage is or is not filled with a specified character.
     5245\item[resize]
     5246an existing allocation is decreased or increased in size.
     5247In either case, new storage may or may not be allocated and, if there is a new allocation, as much data from the existing allocation is copied.
     5248For an increase in storage size, new storage after the copied data may or may not be filled.
     5249\item[alignment]
     5250an allocation starts on a specified memory boundary, e.g., an address multiple of 64 or 128 for cache-line purposes.
     5251\item[array]
     5252the allocation size is scaled to the specified number of array elements.
     5253An array may or not be filled, resized, or aligned.
     5254\end{description}
     5255
     5256The following table show the allocation routines supporting different combinations of storage-management capabilities:
    52405257\begin{center}
    52415258\begin{tabular}{@{}r|l|l|l|l@{}}
     
    52525269\end{tabular}
    52535270\end{center}
    5254 When ©amalloc© resizes and fills, the space after the copied data from the source is set to the fill character.
     5271% When ©amalloc© resizes and fills, the space after the copied data from the source is set to the fill character.
    52555272It is impossible to resize with alignment because the underlying ©realloc© allocates storage if more space is needed, and it does not honour alignment from the original allocation.
    52565273
     
    53385355\begin{cfa}[aboveskip=0pt,belowskip=0pt]
    53395356forall( otype T | { int ?<?( T, T ); } )        §\C{// location}§
    5340 T * bsearch( T key, const T * arr, size_t dimension );§\indexc{bsearch}§
     5357T * bsearch( T key, const T * arr, size_t dim );§\indexc{bsearch}§
    53415358
    53425359forall( otype T | { int ?<?( T, T ); } )        §\C{// position}§
    5343 unsigned int bsearch( T key, const T * arr, size_t dimension );
     5360unsigned int bsearch( T key, const T * arr, size_t dim );
    53445361
    53455362forall( otype T | { int ?<?( T, T ); } )
    5346 void qsort( const T * arr, size_t dimension );§\indexc{qsort}§
     5363void qsort( const T * arr, size_t dim );§\indexc{qsort}§
    53475364\end{cfa}
    53485365
Note: See TracChangeset for help on using the changeset viewer.