cvs: ZendEngine2 / zend_alloc.c zend_alloc.h
| From: | Andi Gutmans | Date: | Tue, 25 May 2004 09:25:22 +0000 |
| Subject: | cvs: ZendEngine2 / zend_alloc.c zend_alloc.h | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-2660@lists.php.net to get a copy of this message | ||
andi Tue May 25 05:25:22 2004 EDT
Modified files:
/ZendEngine2 zend_alloc.c zend_alloc.h
Log:
- Make fix compile.
http://cvs.php.net/diff.php/ZendEngine2/zend_alloc.c?r1=1.132&r2=1.133&ty=u
Index: ZendEngine2/zend_alloc.c
diff -u ZendEngine2/zend_alloc.c:1.132 ZendEngine2/zend_alloc.c:1.133
--- ZendEngine2/zend_alloc.c:1.132 Tue May 25 04:33:11 2004
+++ ZendEngine2/zend_alloc.c Tue May 25 05:25:22 2004
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_alloc.c,v 1.132 2004/05/25 08:33:11 andi Exp $ */
+/* $Id: zend_alloc.c,v 1.133 2004/05/25 09:25:22 andi Exp $ */
#include "zend.h"
#include "zend_alloc.h"
@@ -189,7 +189,7 @@
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 @@
}
#endif
HANDLE_BLOCK_INTERRUPTIONS();
-#if ZEND_DEBUG || !defined(ZEND_MM)
+#if ZEND_DEBUG
REMOVE_POINTER_FROM_LIST(p);
#endif
@@ -337,7 +337,7 @@
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 @@
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 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 @@
# 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 @@
}
#endif /* ZEND_ENABLE_FAST_CACHE */
-#if ZEND_DEBUG || !defined(ZEND_MM)
+#if ZEND_DEBUG
p = AG(head);
t = AG(head);
while (t) {
http://cvs.php.net/diff.php/ZendEngine2/zend_alloc.h?r1=1.50&r2=1.51&ty=u
Index: ZendEngine2/zend_alloc.h
diff -u ZendEngine2/zend_alloc.h:1.50 ZendEngine2/zend_alloc.h:1.51
--- ZendEngine2/zend_alloc.h:1.50 Tue May 25 04:33:11 2004
+++ ZendEngine2/zend_alloc.h Tue May 25 05:25:22 2004
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_alloc.h,v 1.50 2004/05/25 08:33:11 andi Exp $ */
+/* $Id: zend_alloc.h,v 1.51 2004/05/25 09:25:22 andi Exp $ */
#ifndef ZEND_ALLOC_H
#define ZEND_ALLOC_H
@@ -46,7 +46,7 @@
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