mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-04-14 22:51:50 +03:00
Fix stress tests such that testlib code uses the jet_ allocator, but
test code uses libjemalloc.
Generate jemalloc_{rename,mangle}.h, the former because it's needed for
the stress test name mangling fix, and the latter for consistency. As
an artifact of this change, some (but not all) definitions related to
the experimental API are absent from the headers unless the feature is
enabled at configure time.
22 lines
460 B
Bash
Executable file
22 lines
460 B
Bash
Executable file
#!/bin/sh
|
|
|
|
public_symbols_txt=$1
|
|
|
|
cat <<EOF
|
|
/*
|
|
* Name mangling for public symbols is controlled by --with-mangling and
|
|
* --with-jemalloc-prefix. With default settings the je_ prefix is stripped by
|
|
* these macro definitions.
|
|
*/
|
|
#ifndef JEMALLOC_NO_RENAME
|
|
EOF
|
|
|
|
for nm in `cat ${public_symbols_txt}` ; do
|
|
n=`echo ${nm} |tr ':' ' ' |awk '{print $1}'`
|
|
m=`echo ${nm} |tr ':' ' ' |awk '{print $2}'`
|
|
echo "# define je_${n} ${m}"
|
|
done
|
|
|
|
cat <<EOF
|
|
#endif
|
|
EOF
|