|
Apache HTTPD
|
Modules | |
| Pool Cleanup Functions | |
| Pool Debugging functions | |
Typedefs | |
| typedef struct apr_pool_t | apr_pool_t |
| typedef int(* | apr_abortfunc_t) (int retcode) |
Functions | |
| APR_DECLARE (apr_status_t) apr_pool_initialize(void) | |
| apr_pool_t apr_abortfunc_t apr_allocator_t *allocator | __attribute__ ((nonnull(1))) |
| APR_DECLARE (apr_allocator_t *) apr_pool_allocator_get(apr_pool_t *pool) __attribute__((nonnull(1))) | |
| APR_DECLARE (void *) apr_palloc(apr_pool_t *p | |
| apr_pool_t *pool | __attribute__ ((nonnull(2))) |
| APR_DECLARE (apr_abortfunc_t) apr_pool_abort_get(apr_pool_t *pool) __attribute__((nonnull(1))) | |
| APR_DECLARE (apr_pool_t *) apr_pool_parent_get(apr_pool_t *pool) __attribute__((nonnull(1))) | |
| const char apr_pool_t *pool | __attribute__ ((nonnull(1, 2, 3))) |
Variables | |
| apr_pool_t * | parent |
| apr_pool_t apr_abortfunc_t | abort_fn |
| apr_abortfunc_t apr_allocator_t * | allocator |
| apr_abortfunc_t apr_allocator_t const char * | file_line |
| apr_size_t | size |
| apr_pool_t * | b |
| const char * | key |
| const char apr_status_t(* | cleanup )(void *) |
| const char apr_status_t(*) apr_pool_t *poo | __attribute__ )((nonnull(2, 4))) |
Allocate a block of memory from a pool and set all of the memory to 0
| p | The pool to allocate from |
| size | The amount of memory to allocate |
Definition at line 465 of file apr_pools.h.
| #define APR_POOL__FILE_LINE__ __FILE__ ":" APR_STRINGIFY(__LINE__) |
Pool debug levels
| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
---------------------------------
| | | | | | | | x | General debug code enabled (useful in
combination with --with-efence).
| | | | | | | x | | Verbose output on stderr (report
CREATE, CLEAR, DESTROY).
| | | | x | | | | | Verbose output on stderr (report
PALLOC, PCALLOC).
| | | | | | x | | | Lifetime checking. On each use of a
pool, check its lifetime. If the pool
is out of scope, abort().
In combination with the verbose flag
above, it will output LIFE in such an
event prior to aborting.
| | | | | x | | | | Pool owner checking. On each use of a
pool, check if the current thread is the
pool's owner. If not, abort(). In
combination with the verbose flag above,
it will output OWNER in such an event
prior to aborting. Use the debug
function apr_pool_owner_set() to switch
a pool's ownership.
When no debug level was specified, assume general debug mode.
If level 0 was specified, debugging is switched off.
the place in the code where the particular function was called
Definition at line 143 of file apr_pools.h.
Create a new pool.
| newpool | The pool we have just created. |
| parent | The parent pool. If this is NULL, the new pool is a root pool. If it is non-NULL, the new pool will inherit all of its parent pool's attributes, except the apr_pool_t will be a sub-pool. |
Definition at line 322 of file apr_pools.h.
Create a new unmanaged pool.
| newpool | The pool we have just created. |
Definition at line 343 of file apr_pools.h.
Definition at line 345 of file apr_pools.h.
Declaration helper macro to construct apr_foo_pool_get()s.
This standardized macro is used by opaque (APR) data types to return the apr_pool_t that is associated with the data type.
APR_POOL_DECLARE_ACCESSOR() is used in a header file to declare the accessor function. A typical usage and result would be:
APR_POOL_DECLARE_ACCESSOR(file); becomes: APR_DECLARE(apr_pool_t *) apr_file_pool_get(const apr_file_t *thefile);
Definition at line 81 of file apr_pools.h.
Implementation helper macro to provide apr_foo_pool_get()s.
In the implementation, the APR_POOL_IMPLEMENT_ACCESSOR() is used to actually define the function. It assumes the field is named "pool".
Definition at line 91 of file apr_pools.h.
A function that is called when allocation fails.
Definition at line 148 of file apr_pools.h.
The fundamental pool type
Definition at line 60 of file apr_pools.h.
| apr_pool_t apr_abortfunc_t apr_allocator_t *allocator __attribute__ | ( | (nonnull(1)) | ) |
| const char apr_pool_t *pool __attribute__ | ( | (nonnull(1, 2, 3)) | ) |
| apr_pool_t *pool __attribute__ | ( | (nonnull(2)) | ) |
| APR_DECLARE | ( | apr_abortfunc_t | ) |
Get the abort function associated with the specified pool.
| pool | The pool for retrieving the abort function. |
Definition at line 2372 of file apr_pools.c.
| APR_DECLARE | ( | apr_allocator_t * | ) |
Find the pool's allocator
| pool | The pool to get the allocator from. |
Definition at line 2389 of file apr_pools.c.
| APR_DECLARE | ( | apr_pool_t * | ) |
| APR_DECLARE | ( | apr_status_t | ) |
Setup all of the internal structures required to use pools
Create a new pool.
| newpool | The pool we have just created. |
| parent | The parent pool. If this is NULL, the new pool is a root pool. If it is non-NULL, the new pool will inherit all of its parent pool's attributes, except the apr_pool_t will be a sub-pool. |
| abort_fn | A function to use if the pool cannot allocate more memory. |
| allocator | The allocator to use with the new pool. If NULL the allocator of the parent pool will be used. |
Create a new pool.
Create a new unmanaged pool.
| newpool | The pool we have just created. |
| abort_fn | A function to use if the pool cannot allocate more memory. |
| allocator | The allocator to use with the new pool. If NULL a new allocator will be created with the new pool as owner. |
Debug version of apr_pool_create_ex.
| newpool |
| parent |
| abort_fn |
| allocator |
| file_line | Where the function is called from. This is usually APR_POOL__FILE_LINE__. |
Debug version of apr_pool_create_core_ex.
Debug version of apr_pool_create_unmanaged_ex.
| newpool |
| abort_fn |
| allocator |
| file_line | Where the function is called from. This is usually APR_POOL__FILE_LINE__. |
Determine if pool a is an ancestor of pool b.
| a | The pool to search |
| b | The pool to search for |
Set the data associated with the current pool
| data | The user data associated with the pool. |
| key | The key to use for association |
| cleanup | The cleanup program to use to cleanup the data (NULL if none) |
| pool | The current pool |
Users of APR must take EXTREME care when choosing a key to use for their data. It is possible to accidentally overwrite data by choosing a key that another part of the program is using. Therefore it is advised that steps are taken to ensure that unique keys are used for all of the userdata objects in a particular pool (the same key in two different pools or a pool and one of its subpools is okay) at all times. Careful namespace prefixing of key names is a typical way to help ensure this uniqueness.
Set the data associated with the current pool
| data | The user data associated with the pool. |
| key | The key to use for association |
| cleanup | The cleanup program to use to cleanup the data (NULL if none) |
| pool | The current pool |
Return the data associated with the current pool.
| data | The user data associated with the pool. |
| key | The key for the data to retrieve |
| pool | The current pool. |
< File is read-only
< File is executable
< all protections
< File is read-only
< File is read-only
< Write by user
<
< Write by group
<
< Write by others
<
< Write by user
<
< Write by group
<
< Write by others
<
< File is executable
< File is executable
< Execute by user
<
< Execute by group
<
< Execute by others
<
< Execute by user
<
< Execute by group
<
< Execute by others
<
< Stat the link not the file itself if it is a link
< Stat the link not the file itself if it is a link
< ->name in proper case
< ->name in proper case
< Access Time
< Create the file if not there
< Open the file for reading
< Open the file for writing
< Delete the file after close
< Open should fail if APR_FOPEN_CREATE and file exists.
< Do not register a cleanup when the file is opened. The apr_os_file_t handle in apr_file_t will not be closed when the pool is destroyed.
< Read by user
<
< Write by user
<
< Do not register a cleanup when the file is opened. The apr_os_file_t handle in apr_file_t will not be closed when the pool is destroyed.
< Do not register a cleanup when the file is opened. The apr_os_file_t handle in apr_file_t will not be closed when the pool is destroyed.
< ->name in proper case
< Modification Time
< Access Time
< Creation or inode-changed time
< Type
< Size of the file
< Storage size consumed by the file
< Do not register a cleanup when the file is opened. The apr_os_file_t handle in apr_file_t will not be closed when the pool is destroyed.
< ->name in proper case
< ->name in proper case
< Type
< all protections
< ->name in proper case
< ->name in proper case
< File is read-only
< File is hidden
< File is read-only
< File is read-only
< File is hidden
< File is hidden
< Platform dependent flag to enable * non blocking file io
< Open the file for reading
< Open the file for writing
< Open the file for reading
< Open the file for writing
< Open the file for buffered I/O
< Create the file if not there
< Open should fail if APR_FOPEN_CREATE and file exists.
< Open the file and truncate to 0 length
< Open should fail if APR_FOPEN_CREATE and file exists.
< Create the file if not there
< Open the file and truncate to 0 length
< Append to the end of the file
< Do not register a cleanup when the file is opened. The apr_os_file_t handle in apr_file_t will not be closed when the pool is destroyed.
< Delete the file after close
< Open the file for buffered I/O
< Open the file for writing
< Open the file for writing
< Open the file for reading
< Append to the end of the file
< an atomic unix apr_stat()
< Open the file for writing
< Create the file if not there
< Open the file and truncate to 0 length
< Open the file for writing
< Create the file if not there
< Append to the end of the file
< Do not register a cleanup when the file is opened. The apr_os_file_t handle in apr_file_t will not be closed when the pool is destroyed.
< File is read-only
< File is executable
< all protections
< File is read-only
< File is read-only
< Write by user
<
< Write by group
<
< Write by others
<
< Write by user
<
< Write by group
<
< Write by others
<
< File is executable
< File is executable
< Execute by user
<
< Execute by group
<
< Execute by others
<
< Execute by user
<
< Execute by group
<
< Execute by others
<
< Access Time
< Stat the link not the file itself if it is a link
< Stat the link not the file itself if it is a link
< Stat the link not the file itself if it is a link
< Create the file if not there
< Open the file for reading
< Open the file for writing
< Open should fail if APR_FOPEN_CREATE and file exists.
< Delete the file after close
< Open the file for reading
< Open the file for writing
< Open the file for reading
< Open the file for writing
< Create the file if not there
< Open should fail if APR_FOPEN_CREATE and file exists.
< Open should fail if APR_FOPEN_CREATE and file exists.
< Create the file if not there
< Append to the end of the file
< Open the file and truncate to 0 length
< Platform dependent flag to enable * non blocking file io
< use OS's default permissions
<
< Do not register a cleanup when the file is opened. The apr_os_file_t handle in apr_file_t will not be closed when the pool is destroyed.
< Open the file for buffered I/O
< Do not register a cleanup when the file is opened. The apr_os_file_t handle in apr_file_t will not be closed when the pool is destroyed.
< Do not register a cleanup when the file is opened. The apr_os_file_t handle in apr_file_t will not be closed when the pool is destroyed.
< Open the file for buffered I/O
< Open the file for writing
< Open the file for writing
< Open the file for reading
< Do not register a cleanup when the file is opened. The apr_os_file_t handle in apr_file_t will not be closed when the pool is destroyed.
< Do not register a cleanup when the file is opened. The apr_os_file_t handle in apr_file_t will not be closed when the pool is destroyed.
The problem with trying to output the entire iovec is that we cannot maintain the behaviour that a real writev would have. If we iterate over the iovec one at a time, we lose the atomic properties of writev(). The other option is to combine the entire iovec into one buffer that we could then send in one call to write(). This is not reasonable since we do not know how much data an iovec could contain.
The only reasonable option, that maintains the semantics of a real writev(), is to only write the first iovec. Callers of file_writev() must deal with partial writes as they normally would. If you want to ensure an entire iovec is written, use apr_file_writev_full().
< ->name in proper case
< Do not register a cleanup when the file is opened. The apr_os_file_t handle in apr_file_t will not be closed when the pool is destroyed.
< Size of the file
< Size of the file
< dev and inode
< Number of links
< ->name in proper case
< Type
< Type
< ->name in proper case
< File is read-only
< File is hidden
< File is read-only
< File is read-only
< File is hidden
< File is hidden
< Open the file for reading
< use OS's default permissions
<
< Platform dependent flag to enable * non blocking file io
< Open the file for reading
< Open the file for writing
< Create the file if not there
< Open should fail if APR_FOPEN_CREATE and file exists.
< Open the file and truncate to 0 length
< Open the file and truncate to 0 length
< Open should fail if APR_FOPEN_CREATE and file exists.
< Create the file if not there
< Delete the file after close
< Open the file for reading
< Open the file for writing
< Platform dependent tag to open the file for use across multiple threads
< Append to the end of the file
< Open the file for buffered I/O
< Platform dependent flag to enable * sparse file support, see WARNING below
< Do not register a cleanup when the file is opened. The apr_os_file_t handle in apr_file_t will not be closed when the pool is destroyed.
< Append to the end of the file
< Open the file for buffered I/O
< Open the file for writing
< Open the file for writing
< Open the file for reading
< Platform dependent tag to open the file for use across multiple threads
< Platform dependent tag to open the file for use across multiple threads
< Platform dependent tag to open the file for use across multiple threads
< Platform dependent tag to open the file for use across multiple threads
< Platform dependent tag to open the file for use across multiple threads
< Platform dependent tag to open the file for use across multiple threads
< Exclusive lock. Only one process may hold an exclusive lock at any given time. This is analogous to a "write lock".
< Platform dependent tag to open the file for use across multiple threads
< Platform dependent tag to open the file for use across multiple threads
< Platform dependent tag to open the file for use across multiple threads
< Platform dependent tag to open the file for use across multiple threads
< Size of the file
< Platform dependent tag to open the file for use across multiple threads
< Size of the file
Definition at line 74 of file apr_atomic.c.
| APR_DECLARE | ( | void * | ) |
Allocate a block of memory from a pool
| p | The pool to allocate from |
| size | The amount of memory to allocate |
Debug version of apr_palloc
| p | See: apr_palloc |
| size | See: apr_palloc |
| file_line | Where the function is called from. This is usually APR_POOL__FILE_LINE__. |
Debug version of apr_pcalloc
| p | See: apr_pcalloc |
| size | See: apr_pcalloc |
| file_line | Where the function is called from. This is usually APR_POOL__FILE_LINE__. |
Definition at line 131 of file apr_atomic.c.
| apr_abortfunc_t abort_fn |
Definition at line 198 of file apr_pools.h.
| apr_abortfunc_t apr_allocator_t * allocator |
Definition at line 208 of file apr_pools.h.
| apr_pool_t* b |
Definition at line 529 of file apr_pools.h.
| const char apr_status_t(* cleanup)(void *) | ( | void * | ) |
Definition at line 565 of file apr_pools.h.
| apr_abortfunc_t apr_allocator_t const char* file_line |
Definition at line 267 of file apr_pools.h.
Definition at line 564 of file apr_pools.h.
| apr_pool_t * parent |
Definition at line 197 of file apr_pools.h.
| apr_size_t size |
Definition at line 444 of file apr_pools.h.