NORETURN_FUNCTION_END;
}
+#if defined (DEBUGGING) || defined(PERL_IMPLICIT_SYS) || defined (PERL_TRACK_MEMPOOL)
+# define ALWAYS_NEED_THX
+#endif
+
/* paranoid version of system's malloc() */
Malloc_t
Perl_safesysmalloc(MEM_SIZE size)
{
-#ifdef DEBUGGING
+#ifdef ALWAYS_NEED_THX
dTHX;
#endif
Malloc_t ptr;
return ptr;
}
else {
-#ifndef DEBUGGING
+#ifndef ALWAYS_NEED_THX
dTHX;
#endif
if (PL_nomemok)
Malloc_t
Perl_safesysrealloc(Malloc_t where,MEM_SIZE size)
{
-#ifdef DEBUGGING
+#ifdef ALWAYS_NEED_THX
dTHX;
#endif
Malloc_t ptr;
return ptr;
}
else {
-#ifndef DEBUGGING
+#ifndef ALWAYS_NEED_THX
dTHX;
#endif
if (PL_nomemok)
Free_t
Perl_safesysfree(Malloc_t where)
{
-#if defined(DEBUGGING) && (defined(PERL_IMPLICIT_SYS) || defined(PERL_TRACK_MEMPOOL))
+#ifdef ALWAYS_NEED_THX
dTHX;
#else
dVAR;
Malloc_t
Perl_safesyscalloc(MEM_SIZE count, MEM_SIZE size)
{
-#ifdef DEBUGGING
+#ifdef ALWAYS_NEED_THX
dTHX;
#endif
Malloc_t ptr;
return ptr;
}
else {
-#ifndef DEBUGGING
+#ifndef ALWAYS_NEED_THX
dTHX;
#endif
if (PL_nomemok)
}
/*
+=for apidoc Am|void|croak_no_modify
+
+Exactly equivalent to C<Perl_croak(aTHX_ "%s", PL_no_modify)>, but generates
+terser object code than using C<Perl_croak>. Less code used on exception code
+paths reduces CPU cache pressure.
+
+*/
+
+void
+Perl_croak_no_modify(pTHX)
+{
+ Perl_croak(aTHX_ "%s", PL_no_modify);
+}
+
+/*
=for apidoc Am|void|warn_sv|SV *baseex
This is an XS interface to Perl's C<warn> function.