Index: working_vm/vm/port/doc/PortReadme.htm =================================================================== --- working_vm/vm/port/doc/PortReadme.htm (revision 648251) +++ working_vm/vm/port/doc/PortReadme.htm (working copy) @@ -67,32 +67,103 @@
- Port - | - -> file_io - | | - | -> linux - | | - | -> windows - | - -> atomics - | - -> linux_em64t - | - -> linux_ia32 - | - -> windows +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 source directories. -Public headers are kept in a separate base directory named include. Implementation headers may be kept in source directories? +
3. Memory management
-3. Build system
+Port layer contains wrappers for standard memory allocation functions placed atport_malloc.hfile. +They are presented as defines with names likeSTD_MALLOCfor malloc,STD_FREEfor free etc. +By default, they are simply equal to relative functions, but if_MEMMGRis defined then they are replaced with +other set of functions likeport_malloc,port_freeetc. +These functions provide additional functionality at the expense of lower performance. ++New provided features: -Currently we reuse VM build system based on MakeCommon.
+
java.lang.management interface
+_MEMMGR_LOG macro should be defined.
+This macro also enables double free calling notifications.
+For the final not freed
+ memory report providing _MEMMGR_REPORT definition should be used.
+
+Currently place for stress memory allocator is defined, but it is not implemented yet, only redirects to standard malloc.
+To switch on stress allocation STRESS_MALLOC macro should be defined.
+
+Memory management module couldn't use port logging, because it lead to infinite recursion. Its own primitive logging system uses file in current directory with name malloc.log for both logging and reporting.
+Different file name and location could be set via MALLOC_LOG_FILE_NAME definition.
+
+Used memory could be obtained by means of java.lang.management interface.
+It is presented as non-heap memory pool with name Native Memory Pool.
+Different pool name could be set by means of NATIVE_POOL_NAME redefinition.
+
+
+
apr_file_eof();
apr_dso_load() fails on NULL path -