Changeset 2371
- Timestamp:
- Nov 15, 2004, 12:22:53 PM (22 years ago)
- Location:
- trunk/doc/pslib
- Files:
-
- 2 edited
-
ChangeLogSDRS.tex (modified) (2 diffs)
-
psLibSDRS.tex (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/pslib/ChangeLogSDRS.tex
r2367 r2371 1 %%% $Id: ChangeLogSDRS.tex,v 1.4 4 2004-11-15 20:20:30price Exp $1 %%% $Id: ChangeLogSDRS.tex,v 1.45 2004-11-15 22:22:48 price Exp $ 2 2 3 3 \subsection{Changes from version 00 to version 01} … … 373 373 \item Removed errors from \code{psVectorFitSpline1D}. 374 374 \item \code{psTraceReset} is to free memory used by \code{psTrace}. 375 \item Added requirement on use of persistent memory --- any use of 376 persistent memory shall provide a function that frees the persistent 377 memory. 378 \item Added statement on use of \code{restrict}. 375 379 \end{itemize} 376 380 -
trunk/doc/pslib/psLibSDRS.tex
r2367 r2371 1 %%% $Id: psLibSDRS.tex,v 1.15 0 2004-11-15 20:19:46price Exp $1 %%% $Id: psLibSDRS.tex,v 1.151 2004-11-15 22:22:53 price Exp $ 2 2 \documentclass[panstarrs,spec]{panstarrs} 3 3 … … 158 158 convenience to the user. 159 159 160 \subsection{Use of \code{restrict}} 161 162 The \code{restrict} type qualifier in C99 indicates to the compiler 163 that the memory pointed to by a particular pointer is not also pointed 164 to by some other pointer. This allows the compiler to optimise the 165 code, based on the fact that aliasing is not an issue. However, the 166 compiler does not check the accuracy of the assumption on which the 167 optimisation is made, which can lead to data corruption. 168 169 Due to the large number of cross-links in psLib (e.g., the metadata 170 container keeps two pointers to the data), the assumption behind the 171 use of \code{restrict} generally will not hold. Correspondingly, use 172 of \code{restrict} should be kept to a minimum; it should only be 173 employed where necessary, and where the assumption will hold. 174 160 175 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 161 176 … … 363 378 only provided if the code is compiled with the preprocessor variable 364 379 \code{PS_MEM_DEBUG} defined. 380 381 \paragraph{Use of Persistent Memory} 382 383 The \code{persistent} member of the \code{psMemBlock} is provided as a 384 convenience to the end-user of psLib --- it allows him to check for 385 memory leaks in his own code, without going to the trouble of freeing 386 memory allocated for psLib core functions. It also allows the use of 387 psLib core functions (e.g., \code{psLogMsg, psTrace}) within the 388 function that is called by \code{psMemCheckLeaks}, without the memory 389 allocated by those psLib core functions being identified as a leak. 390 391 For these reasons, the \code{persistant} feature should only be used 392 as necessary. In order to allow proper testing of psLib, all 393 components that employ any \code{persistent} memory shall provide a 394 function that frees all of its \code{persistent} memory (and only that 395 persistent memory that belongs to that component). 365 396 366 397 \subsubsection{APIs for Allocating and Freeing}
Note:
See TracChangeset
for help on using the changeset viewer.
