summaryrefslogtreecommitdiff
path: root/sharedsv.c
diff options
context:
space:
mode:
authorArtur Bergman <sky@nanisky.com>2001-09-26 06:54:32 +0000
committerArtur Bergman <sky@nanisky.com>2001-09-26 06:54:32 +0000
commit59ae57287215834d4b338afe99d274f35da9b1a1 (patch)
treeea2d2be349bc2d5ecc79043320bb3d1b5b74dfb9 /sharedsv.c
parent0631ea039330939c8d770bbc106391c8b0287539 (diff)
downloadperl-59ae57287215834d4b338afe99d274f35da9b1a1.tar.gz
Use a separate interpreter for the sharedsv space. Another
negative sv leak. Sigh. p4raw-id: //depot/perl@12223
Diffstat (limited to 'sharedsv.c')
-rw-r--r--sharedsv.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sharedsv.c b/sharedsv.c
index d03443c72d..2d347b8204 100644
--- a/sharedsv.c
+++ b/sharedsv.c
@@ -44,8 +44,11 @@ currently only stores a pointer to the first interpreter.
void
Perl_sharedsv_init(pTHX)
{
- PL_sharedsv_space = PERL_GET_CONTEXT;
- MUTEX_INIT(&PL_sharedsv_space_mutex);
+ PerlInterpreter* old_context = PERL_GET_CONTEXT;
+ PL_sharedsv_space = perl_alloc();
+ perl_construct(PL_sharedsv_space);
+ PERL_SET_CONTEXT(old_context);
+ MUTEX_INIT(&PL_sharedsv_space_mutex);
}
/*