mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-08-25 00:23:33 +03:00
Refactor permuted backtrace test allocation.
Refactor permuted backtrace test allocation that was originally used only by the prof_accum test, so that it can be used by other heap profiling test binaries.
This commit is contained in:
parent
f8034540a1
commit
cc9e626ea9
10 changed files with 60 additions and 56 deletions
|
|
@ -1,4 +1,9 @@
|
|||
#include "prof_accum.h"
|
||||
#include "test/jemalloc_test.h"
|
||||
|
||||
#define NTHREADS 4
|
||||
#define NALLOCS_PER_THREAD 50
|
||||
#define DUMP_INTERVAL 1
|
||||
#define BT_COUNT_CHECK_INTERVAL 5
|
||||
|
||||
#ifdef JEMALLOC_PROF
|
||||
const char *malloc_conf =
|
||||
|
|
@ -20,7 +25,7 @@ static void *
|
|||
alloc_from_permuted_backtrace(unsigned thd_ind, unsigned iteration)
|
||||
{
|
||||
|
||||
return (alloc_0(thd_ind*NALLOCS_PER_THREAD + iteration));
|
||||
return (btalloc(1, thd_ind*NALLOCS_PER_THREAD + iteration));
|
||||
}
|
||||
|
||||
static void *
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue