Software: Apache/2.0.54 (Unix) mod_perl/1.99_09 Perl/v5.8.0 mod_ssl/2.0.54 OpenSSL/0.9.7l DAV/2 FrontPage/5.0.2.2635 PHP/4.4.0 mod_gzip/2.0.26.1a uname -a: Linux snow.he.net 4.4.276-v2-mono-1 #1 SMP Wed Jul 21 11:21:17 PDT 2021 i686 uid=99(nobody) gid=98(nobody) groups=98(nobody) Safe-mode: OFF (not secure) /usr/local/apache2/manual/developer/ drwxr-xr-x | |
| Viewing file: Select action/file-type:
Apache HTTP Server Version 2.0Debugging Memory Allocation in APR
|
| Option 1 | ALLOC DEBUG |
ALLOC USE MALLOC |
POOL DEBUG |
MAKE TABLE PROFILE |
ALLOC STATS |
|---|---|---|---|---|---|
| ALLOC_DEBUG | No | Yes | Yes | Yes | |
| ALLOC_USE MALLOC |
No | No | No | No | |
| POOL_DEBUG | Yes | No | Yes | Yes | |
| MAKE_TABLE PROFILE |
Yes | No | Yes | Yes | |
| ALLOC_STATS | Yes | No | Yes | Yes |
Additionally the debugging options are not suitable for multi-threaded versions of the server. When trying to debug with these options the server should be started in single process mode.
The various options for debugging memory are now enabled in the apr_general.h header file in APR. The various options are enabled by uncommenting the define for the option you wish to use. The section of the code currently looks like this (contained in srclib/apr/include/apr_pools.h)
/*
#define ALLOC_DEBUG
#define POOL_DEBUG
#define ALLOC_USE_MALLOC
#define MAKE_TABLE_PROFILE
#define ALLOC_STATS
*/
typedef struct ap_pool_t {
union block_hdr *first;
union block_hdr *last;
struct cleanup *cleanups;
struct process_chain *subprocesses;
struct ap_pool_t *sub_pools;
struct ap_pool_t *sub_next;
struct ap_pool_t *sub_prev;
struct ap_pool_t *parent;
char *free_first_avail;
#ifdef ALLOC_USE_MALLOC
void *allocation_list;
#endif
#ifdef POOL_DEBUG
struct ap_pool_t *joined;
#endif
int (*apr_abort)(int retcode);
struct datastruct *prog_data;
}ap_pool_t;
To enable allocation debugging simply move the #define ALLOC_DEBUG above the start of the comments block and rebuild the server.
NB. In order to use the various options the server MUST be rebuilt after editing the header file.
:: Command execute :: | |
--[ c99shell v. 1.0 pre-release build #13 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0315 ]-- |