summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndi Gutmans <andi@php.net>2004-05-25 09:25:22 +0000
committerAndi Gutmans <andi@php.net>2004-05-25 09:25:22 +0000
commit6704ab4b35cf41626462242adf4dcf7ea55775e6 (patch)
treecff0e3efeb3ef607fa4602d08226db965dc2394d
parentdb90fc4c90d5ec2d4edba507fb164d8bca17599c (diff)
downloadphp-git-6704ab4b35cf41626462242adf4dcf7ea55775e6.tar.gz
- Make fix compile.
-rw-r--r--Zend/zend_alloc.c16
-rw-r--r--Zend/zend_alloc.h2
2 files changed, 10 insertions, 8 deletions
diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c
index 9cc9038fec..db75d5f3f0 100644
--- a/Zend/zend_alloc.c
+++ b/Zend/zend_alloc.c
@@ -189,7 +189,7 @@ ZEND_API void *_emalloc(size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
return (void *)p;
}
p->cached = 0;
-#if ZEND_DEBUG || !defined(ZEND_MM)
+#if ZEND_DEBUG
ADD_POINTER_TO_LIST(p);
#endif
p->size = size; /* Save real size for correct cache output */
@@ -272,7 +272,7 @@ ZEND_API void _efree(void *ptr ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
}
#endif
HANDLE_BLOCK_INTERRUPTIONS();
-#if ZEND_DEBUG || !defined(ZEND_MM)
+#if ZEND_DEBUG
REMOVE_POINTER_FROM_LIST(p);
#endif
@@ -337,7 +337,7 @@ ZEND_API void *_erealloc(void *ptr, size_t size, int allow_failure ZEND_FILE_LIN
AG(allocated_memory_peak) = AG(allocated_memory);
}
#endif
-#if ZEND_DEBUG || !defined(ZEND_MM)
+#if ZEND_DEBUG
REMOVE_POINTER_FROM_LIST(p);
#endif
p = (zend_mem_header *) ZEND_DO_REALLOC(p, sizeof(zend_mem_header)+MEM_HEADER_PADDING+SIZE+END_MAGIC_SIZE);
@@ -350,13 +350,13 @@ ZEND_API void *_erealloc(void *ptr, size_t size, int allow_failure ZEND_FILE_LIN
exit(1);
#endif
}
-#if ZEND_DEBUG || !defined(ZEND_MM)
+#if ZEND_DEBUG
ADD_POINTER_TO_LIST(orig);
#endif
HANDLE_UNBLOCK_INTERRUPTIONS();
return (void *)NULL;
}
-#if ZEND_DEBUG || !defined(ZEND_MM)
+#if ZEND_DEBUG
ADD_POINTER_TO_LIST(p);
#endif
#if ZEND_DEBUG
@@ -470,7 +470,7 @@ ZEND_API void start_memory_manager(TSRMLS_D)
ZEND_API void shutdown_memory_manager(int silent, int full_shutdown TSRMLS_DC)
{
-#if ZEND_DEBUG || !defined(ZEND_MM)
+#if ZEND_DEBUG
zend_mem_header *p, *t;
#endif
#if ZEND_DEBUG
@@ -489,7 +489,9 @@ ZEND_API void shutdown_memory_manager(int silent, int full_shutdown TSRMLS_DC)
# if MEMORY_LIMIT
AG(allocated_memory) -= REAL_SIZE(ptr->size);
# endif
+# if ZEND_DEBUG
REMOVE_POINTER_FROM_LIST(ptr);
+# endif
ZEND_DO_FREE(ptr);
}
AG(cache_count)[i] = 0;
@@ -526,7 +528,7 @@ ZEND_API void shutdown_memory_manager(int silent, int full_shutdown TSRMLS_DC)
}
#endif /* ZEND_ENABLE_FAST_CACHE */
-#if ZEND_DEBUG || !defined(ZEND_MM)
+#if ZEND_DEBUG
p = AG(head);
t = AG(head);
while (t) {
diff --git a/Zend/zend_alloc.h b/Zend/zend_alloc.h
index 7be3456931..27055a0bc5 100644
--- a/Zend/zend_alloc.h
+++ b/Zend/zend_alloc.h
@@ -46,7 +46,7 @@ typedef struct _zend_mem_header {
THREAD_T thread_id;
# endif
#endif
-#if ZEND_DEBUG || !defined(ZEND_MM)
+#if ZEND_DEBUG
struct _zend_mem_header *pNext;
struct _zend_mem_header *pLast;
#endif