Init SAFs
258
Netscape Enterprise Server NSAPI Programmer’s Guide • April 2002 (Draft)
The
pool-init
function changes the default values of pooled memory settings.
The size of the free block list may be changed or pooled memory may be entirely
disabled.
Memory allocation pools allow the server to run significantly faster. If you are
programming with the NSAPI, note that
MALLOC
,
REALLOC
,
CALLOC
,
STRDUP
, and
FREE
work slightly differently if pooled memory is disabled. If pooling is enabled,
the server automatically cleans up all memory allocated by these routines when
each request completes. In most cases, this will improve performance and prevent
memory leaks. If pooling is disabled, all memory is global and there is no clean-up.
If you want persistent memory allocation, add the prefix
PERM_
to the name of each
routine (
PERM_MALLOC
,
PERM_REALLOC
,
PERM_CALLOC
,
PERM_STRDUP
, and
PERM_FREE
).
Parameters
Example
register-http-method
Applicable in
Init
-class directives.
This function lets you extend the HTTP protocol by registering new HTTP
methods. (You do not need to register the default HTTP methods.)
NOTE
Any memory you allocate from Init-class functions will be allocated
as persistent memory, even if you use
MALLOC
. The server cleans up
only the memory that is allocated while processing a request, and
because Init-class functions are run before processing any requests,
their memory is allocated globally.
free-size
(optional) maximum size in bytes of free block list. May not
be greater than 1048576.
disable
(optional) flag to disable the use of pooled memory. Should
have a value of true or false. Default value is false.
Init fn=pool-init disable=true
Summary of Contents for ENTERPRISE SERVER 6.1
Page 1: ...NSAPI Programmer s Guide Netscape Enterprise Server Version6 1 April 2002 Draft...
Page 290: ...Miscellaneous 290 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...
Page 318: ...cinfo 318 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...
Page 336: ...Buffered Streams 336 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...
Page 344: ...344 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...
Page 350: ...350 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...
Page 356: ...356 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...