port |->build |->doc |->include | ->tl ->src |->atomic | |->linux | |->linux_ipf | ->win |->barriers | ->linux_ipf |->crash_handler | |->em64t | |->ia32 | |->include | |->ipf | |->linux | | ->include | ->win |->disasm | |->linux | ->win |->encoder | ->ia32_em64t |->file_io | |->linux | ->win |->lil | ->em64t |->logger |->malloc |->memaccess | |->linux | ->win |->misc | |->linux | ->win |->modules | |->linux | ->win |->signals | |->include | |->linux | ->win |->thread | |->linux | ->win |->time |->tl ->vmem |->linux ->win
Public headers are kept in a separate base directory named include/
.
Implementation headers may be kept in the source directories.
port_malloc.h
file.
They are presented as defines with names like STD_MALLOC
for malloc, STD_FREE
for
free etc. By default, they are simply equal to relative functions, but if _MEMMGR
is
defined, they are replaced with another set of functions like port_malloc
, port_free
etc.
These functions provide additional functionality at the expense of lower performance.
Newly provided features:
java.lang.management
interface
To switch on allocation and de-allocation logging, define the _MEMMGR_LOG
macro.
This macro also enables double free calling notifications.
For the final not freed
memory reporting, define the _MEMMGR_REPORT
macro.
Currently, the stress memory allocator is defined not yet implemented, and just
redirects to standard malloc. To switch on stress allocation, define the STRESS_MALLOC
macro.
The memory management module cannot use port logging because it leads to infinite
recursion. Its own primitive logging system uses the file in the current directory
with name malloc.log
for
both logging and reporting. A different file name and location can be defining MALLOC_LOG_FILE_NAME
.
Used memory could be obtained by means of the java.lang.management
interface.
It is presented as non-heap memory pool with name Native Memory Pool
.
Different pool name could be set by redefining NATIVE_POOL_NAME
.
apr_file_eof()
apr_dso_load()
fails on NULL path -
which is meant for obtaining a handle for the calling module itself