pike.git / src / builtin_functions.c

version» Context lines:

pike.git/src/builtin_functions.c:7481:    size_t num,size;    struct svalue *ss;   #ifdef USE_DL_MALLOC    struct mallinfo mi = dlmallinfo();   #elif HAVE_MALLINFO    struct mallinfo mi = mallinfo();   #endif    pop_n_elems(args);    ss=Pike_sp;    +  /* TODO: If USE_DL_MALLOC is defined then this will report the +  * statistics from our bundled Doug Lea malloc, and not the +  * underlying system malloc. Ideally we should include both. */ +    #if defined(HAVE_MALLINFO) || defined(USE_DL_MALLOC)       push_text("num_malloc_blocks");    push_ulongest(1 + mi.hblks); /* 1 for the arena. */    push_text("malloc_block_bytes");    /* NB: Kludge for glibc: hblkhd is intended for malloc overhead    * according to the Solaris manpages, but glibc keeps the    * amount of mmapped memory there, and uses the arena only    * for the amount from sbrk.    *