Changeset 4368
- Timestamp:
- Jun 23, 2005, 11:19:45 AM (21 years ago)
- Location:
- trunk/doc/pslib
- Files:
-
- 2 edited
-
ChangeLogSDRS.tex (modified) (2 diffs)
-
psLibSDRS.tex (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/pslib/ChangeLogSDRS.tex
r4365 r4368 1 %%% $Id: ChangeLogSDRS.tex,v 1.15 1 2005-06-23 03:06:32price Exp $1 %%% $Id: ChangeLogSDRS.tex,v 1.152 2005-06-23 21:19:45 price Exp $ 2 2 3 3 \subsection{Changes from version 00 to version 01} … … 736 736 \item Added \code{psArrayElementsFree} (already implemented). 737 737 \item \code{psMask} changed to \code{psMaskType} (more clear). 738 \item Use the \code{region} in \code{psImageTransform} to set the size of the output image (bug 453). 739 \item \code{list} in \code{psListIteratorAlloc} is not const (bug 455). 740 \end{itemize} 738 \item Use the \code{region} in \code{psImageTransform} to set the size 739 of the output image (bug 453). 740 \item \code{list} in \code{psListIteratorAlloc} is not const (bug 741 455). 742 \item Clarified policy on signed/unsigned for memory allocation; 743 \code{psAlloc} checks the allocation size against 744 \code{PS_MEM_LIMIT}. 745 \end{itemize} -
trunk/doc/pslib/psLibSDRS.tex
r4365 r4368 1 %%% $Id: psLibSDRS.tex,v 1.29 4 2005-06-23 03:06:32price Exp $1 %%% $Id: psLibSDRS.tex,v 1.295 2005-06-23 21:19:45 price Exp $ 2 2 \documentclass[panstarrs,spec]{panstarrs} 3 3 … … 547 547 \code{NULL}. If no free function is set, \code{psMemGetDeallocator} 548 548 shall return \code{NULL}. 549 550 \paragraph{Negative allocations} 551 552 Note that we have specified that the memory size is unsigned 553 (\code{size_t}), so that we can address the full range of memory that 554 the architecture will allow, and to match the behaviour of the system 555 \code{malloc}. This creates the potential for problems if a negative 556 value is inadvertently passed to \code{psAlloc} --- it will be 557 interpreted as a very large positive value. To guard against this, we 558 specify that \code{psAlloc} must check that the allocation is less 559 than \code{PS_MEM_LIMIT} (a preprocessor variable). 560 561 For array-like collections (specifically, \code{psArray}, 562 \code{psVector}, and \code{psImage}) we allow the user to refer to a 563 negative index to mean address from the end. Consequently, the number 564 of elements in structures should be signed. It is the responsibility 565 of these structure allocators (e.g., \code{psArrayAlloc}) to check 566 that the requested number of elements is not negative (calling 567 \code{psAbort} otherwise). All other allocators shall simply use 568 size_t where the number of elements is needed (saving the trouble of 569 checking before passing to psAlloc). 549 570 550 571 \subsubsection{Callback Routines}
Note:
See TracChangeset
for help on using the changeset viewer.
