Checking mallopt() during configure.
mallopt() is absent on Alpine musl.
This commit is contained in:
16
auto/malloc
16
auto/malloc
@@ -157,3 +157,19 @@ if [ $nxt_found = no ]; then
|
|||||||
}"
|
}"
|
||||||
. auto/feature
|
. auto/feature
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# Linux mallopt().
|
||||||
|
|
||||||
|
nxt_feature="Linux mallopt()"
|
||||||
|
nxt_feature_name=NXT_HAVE_MALLOPT
|
||||||
|
nxt_feature_run=
|
||||||
|
nxt_feature_incs=
|
||||||
|
nxt_feature_libs=
|
||||||
|
nxt_feature_test="#include <malloc.h>
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
mallopt(M_PERTURB, 0x55);
|
||||||
|
return 0;
|
||||||
|
}"
|
||||||
|
. auto/feature
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ nxt_lib_start(const char *app, char **argv, char ***envp)
|
|||||||
|
|
||||||
nxt_main_log.level = NXT_LOG_DEBUG;
|
nxt_main_log.level = NXT_LOG_DEBUG;
|
||||||
|
|
||||||
#if (NXT_LINUX)
|
#if (NXT_HAVE_MALLOPT)
|
||||||
/* Fill memory with 0xAA after malloc() and with 0x55 before free(). */
|
/* Fill memory with 0xAA after malloc() and with 0x55 before free(). */
|
||||||
mallopt(M_PERTURB, 0x55);
|
mallopt(M_PERTURB, 0x55);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user