# HG changeset patch # User Adam Chlipala # Date 1287071694 14400 # Node ID 127561e4aef165ff0beb796f823b92312ef913f8 # Parent 714e8b84221b2d0075d7333f6d500a772229c6fc Documenting limits diff -r 714e8b84221b -r 127561e4aef1 CHANGELOG --- a/CHANGELOG Thu Oct 14 11:35:56 2010 -0400 +++ b/CHANGELOG Thu Oct 14 11:54:54 2010 -0400 @@ -6,8 +6,10 @@ - New 'onError' directive for .urp files - (* *) and comments in XML - Basis.classes, Basis.confirm, and Basis.tryDml +- New notations ::_ and :::_, for constructor parameters of unknown kind - Invocations like 'urweb foo' will compile foo.ur as a single-file project, even if no foo.urp exists +- '-limit' command-line flag and 'limit' .urp directive - Bug fixes and optimization improvements ======== diff -r 714e8b84221b -r 127561e4aef1 doc/manual.tex --- a/doc/manual.tex Thu Oct 14 11:35:56 2010 -0400 +++ b/doc/manual.tex Thu Oct 14 11:54:54 2010 -0400 @@ -146,6 +146,22 @@ \item \texttt{include FILENAME} adds \texttt{FILENAME} to the list of files to be \texttt{\#include}d in C sources. This is most useful for interfacing with new FFI modules. \item \texttt{jsFunc Module.ident=name} gives the JavaScript name of an FFI value. \item \texttt{library FILENAME} parses \texttt{FILENAME.urp} and merges its contents with the rest of the current file's contents. If \texttt{FILENAME.urp} doesn't exist, the compiler also tries \texttt{FILENAME/lib.urp}. +\item \texttt{limit class num} sets a resource usage limit for generated applications. The limit \texttt{class} will be set to the non-negative integer \texttt{num}. The classes are: + \begin{itemize} + \item \texttt{cleanup}: maximum number of cleanup operations (e.g., entries recording the need to deallocate certain temporary objects) that may be active at once per request + \item \texttt{database}: maximum size of database files (currently only used by SQLite) + \item \texttt{deltas}: maximum number of messages sendable in a single request handler with \texttt{Basis.send} + \item \texttt{globals}: maximum number of global variables that FFI libraries may set in a single request context + \item \texttt{headers}: maximum size (in bytes) of per-request buffer used to hold HTTP headers for generated pages + \item \texttt{heap}: maximum size (in bytes) of per-request heap for dynamically-allocated data + \item \texttt{inputs}: maximum number of top-level form fields per request + \item \texttt{messages}: maximum size (in bytes) of per-request buffer used to hold a single outgoing message sent with \texttt{Basis.send} + \item \texttt{page}: maximum size (in bytes) of per-request buffer used to hold HTML content of generated pages + \item \texttt{script}: maximum size (in bytes) of per-request buffer used to hold JavaScript content of generated pages + \item \texttt{subinputs}: maximum number of form fields per request, excluding top-level fields + \item \texttt{time}: maximum running time of a single page request, in units of approximately 0.1 seconds + \item \texttt{transactionals}: maximum number of custom transactional actions (e.g., sending an e-mail) that may be run in a single page generation + \end{itemize} \item \texttt{link FILENAME} adds \texttt{FILENAME} to the list of files to be passed to the GCC linker at the end of compilation. This is most useful for importing extra libraries needed by new FFI modules. \item \texttt{onError Module.var} changes the handling of fatal application errors. Instead of displaying a default, ugly error 500 page, the error page will be generated by calling function \texttt{Module.var} on a piece of XML representing the error message. The error handler should have type $\mt{xbody} \to \mt{transaction} \; \mt{page}$. Note that the error handler \emph{cannot} be in the application's main module, since that would register it as explicitly callable via URLs. \item \texttt{path NAME=VALUE} creates a mapping from \texttt{NAME} to \texttt{VALUE}. This mapping may be used at the beginnings of filesystem paths given to various other configuration directives. A path like \texttt{\$NAME/rest} is expanded to \texttt{VALUE/rest}. There is an initial mapping from the empty name (for paths like \texttt{\$/list}) to the directory where the Ur/Web standard library is installed. If you accept the default \texttt{configure} options, this directory is \texttt{/usr/local/lib/urweb/ur}. @@ -215,6 +231,8 @@ \end{verbatim} \end{itemize} +\item \texttt{-limit class num}: Equivalent to the \texttt{limit} directive from \texttt{.urp} files + \item \texttt{-output FILENAME}: Set where the application executable is written. \item \texttt{-path NAME VALUE}: Set the value of path variable \texttt{\$NAME} to \texttt{VALUE}, for use in \texttt{.urp} files.