jmemprof                package:rJava                R Documentation

_r_J_a_v_a _m_e_m_o_r_y _p_r_o_f_i_l_e_r

_D_e_s_c_r_i_p_t_i_o_n:

     '.jmemprof' enables or disables rJava memory profiling. If rJava
     was compiled without memory profiling support, then a call to this
     function always causes an error.

_U_s_a_g_e:

     .jmemprof(file = "-")

_A_r_g_u_m_e_n_t_s:

    file: file to write profiling information to or 'NULL' to disable
          profiling

_D_e_t_a_i_l_s:

     The 'file' parameter must be either a filename (which will be
     opened in append-mode) or "-" to use standard output or 'NULL' to
     disable profiling. An empty string "" is equivalent to 'NULL' in
     this context.

     Note that lots of finalizers are run only when R exists, so
     usually you want to enable profiling early and let R exit to get a
     sensible profile. Runninng gc may be helpful to get rid of
     references that can be collected in R.

     A simple prel script is provided to analyze the result of the
     profiler. Due to its simple text format, it is possible to capture
     entire stdout including the profiler information to have both the
     console context for the allocations and the profile. Memory
     profiling is also helful if rJava debug is enabled.

     Note that memory profiling support must be compiled in rJava and
     it is by default compiled only if debug mode is enabled (which is
     not the case by deafult).

_V_a_l_u_e:

     Returns 'NULL'.

_E_x_a_m_p_l_e_s:

     ## Not run: 
     .jmemprof("rJAva.mem.profile.txt")
     ## End(Not run)

