summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorMarcus Holland-Moritz <mhx-perl@gmx.net>2008-01-06 11:05:27 +0000
committerMarcus Holland-Moritz <mhx-perl@gmx.net>2008-01-06 11:05:27 +0000
commit5186cc1225228b10ef0f8c5cf7d34fbcf0e84174 (patch)
tree7f6584b6eedaead440a1b6512964ee6af02cb149 /op.c
parent92905b42ad1ca082d0ec8476b85c67f306c4bba3 (diff)
downloadperl-5186cc1225228b10ef0f8c5cf7d34fbcf0e84174.tar.gz
Fix compilation issues and warnings with exotic configuration.
p4raw-id: //depot/perl@32865
Diffstat (limited to 'op.c')
-rw-r--r--op.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/op.c b/op.c
index 4f8879ef4b..c07a1a7906 100644
--- a/op.c
+++ b/op.c
@@ -116,6 +116,7 @@ recursive, but it's recursive on basic blocks, not on tree nodes.
void *
Perl_Slab_Alloc(pTHX_ size_t sz)
{
+ dVAR;
/*
* To make incrementing use count easy PL_OpSlab is an I32 *
* To make inserting the link to slab PL_OpPtr is I32 **
@@ -127,7 +128,7 @@ Perl_Slab_Alloc(pTHX_ size_t sz)
#ifdef PERL_DEBUG_READONLY_OPS
/* We need to allocate chunk by chunk so that we can control the VM
mapping */
- PL_OpPtr = mmap(0, PERL_SLAB_SIZE*sizeof(I32*), PROT_READ|PROT_WRITE,
+ PL_OpPtr = (I32**) mmap(0, PERL_SLAB_SIZE*sizeof(I32*), PROT_READ|PROT_WRITE,
MAP_ANON|MAP_PRIVATE, -1, 0);
DEBUG_m(PerlIO_printf(Perl_debug_log, "mapped %lu at %p\n",
@@ -159,7 +160,7 @@ Perl_Slab_Alloc(pTHX_ size_t sz)
#ifdef PERL_DEBUG_READONLY_OPS
/* We remember this slab. */
/* This implementation isn't efficient, but it is simple. */
- PL_slabs = realloc(PL_slabs, sizeof(I32**) * (PL_slab_count + 1));
+ PL_slabs = (I32**) realloc(PL_slabs, sizeof(I32**) * (PL_slab_count + 1));
PL_slabs[PL_slab_count++] = PL_OpSlab;
DEBUG_m(PerlIO_printf(Perl_debug_log, "Allocate %p\n", PL_OpSlab));
#endif
@@ -259,6 +260,7 @@ Perl_Slab_Free(pTHX_ void *op)
if (count) {
while (count--) {
if (PL_slabs[count] == slab) {
+ dVAR;
/* Found it. Move the entry at the end to overwrite it. */
DEBUG_m(PerlIO_printf(Perl_debug_log,
"Deallocate %p by moving %p from %lu to %lu\n",