summaryrefslogtreecommitdiff
path: root/op.h
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2006-04-12 12:01:38 +0000
committerNicholas Clark <nick@ccl4.org>2006-04-12 12:01:38 +0000
commit04e62e517a756f965d577afe246e77a841330712 (patch)
treecf386358d78e7d959ec333adef84eed4842340b6 /op.h
parentbac066580cdb04efa84baa0fa96c51c7107436cf (diff)
downloadperl-04e62e517a756f965d577afe246e77a841330712.tar.gz
As OPs are shared between threads, they should be using
PerlMemShared_*alloc functions, rather than per-thread *alloc()s. p4raw-id: //depot/perl@27773
Diffstat (limited to 'op.h')
-rw-r--r--op.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/op.h b/op.h
index e38c578c48..7ae65d73dc 100644
--- a/op.h
+++ b/op.h
@@ -551,10 +551,12 @@ struct loop {
(var = (OP *) Perl_Slab_Alloc(aTHX_ m,size))
#define FreeOp(p) Perl_Slab_Free(aTHX_ p)
#else
-#define NewOp(m, var, c, type) Newxz(var, c, type)
+#define NewOp(m, var, c, type) \
+ (var = (MEM_WRAP_CHECK_(c,type) \
+ (type*)PerlMemShared_calloc(c, sizeof(type))))
#define NewOpSz(m, var, size) \
- (var = (OP*)safemalloc(size), memzero(var, size))
-#define FreeOp(p) Safefree(p)
+ (var = (OP*)PerlMemShared_calloc(1, size))
+#define FreeOp(p) PerlMemShared_free(p)
#endif
#ifdef PERL_MAD