summaryrefslogtreecommitdiff
path: root/scope.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-04-03 23:14:34 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-04-03 23:14:34 +0000
commit677b06e3672f6584546f6a391abaf54a138910e8 (patch)
tree4f1bd1da5fb48e8b34995120a60559df6d3f2716 /scope.c
parent67caa1fef1ac64bae9d7c9deecbf100088307e6f (diff)
downloadperl-677b06e3672f6584546f6a391abaf54a138910e8.tar.gz
grow PL_tmps_stack more efficiently; make it more amenable to
STRESS_REALLOC testing p4raw-id: //depot/perl@3215
Diffstat (limited to 'scope.c')
-rw-r--r--scope.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/scope.c b/scope.c
index 4d62ae8368..b8d45584e2 100644
--- a/scope.c
+++ b/scope.c
@@ -135,6 +135,19 @@ savestack_grow(void)
#undef GROW
void
+tmps_grow(I32 n)
+{
+ dTHR;
+#ifndef STRESS_REALLOC
+ if (n < 128)
+ n = (PL_tmps_max < 512) ? 128 : 512;
+#endif
+ PL_tmps_max = PL_tmps_ix + n + 1;
+ Renew(PL_tmps_stack, PL_tmps_max, SV*);
+}
+
+
+void
free_tmps(void)
{
dTHR;