summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZeev Suraski <zeev@php.net>2001-06-29 00:36:34 +0000
committerZeev Suraski <zeev@php.net>2001-06-29 00:36:34 +0000
commit3eb6d65ece1d6661cbc730fe78430d2485d25e1d (patch)
tree7b1625bba9244102fa95355a7d193e19bc8b4873
parent446567cb2660415e62d96d089994877ab6821b48 (diff)
downloadphp-git-3eb6d65ece1d6661cbc730fe78430d2485d25e1d.tar.gz
Fix memory_limit, kill warning
-rw-r--r--Zend/zend_alloc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c
index 04e7ce517c..632e13aeeb 100644
--- a/Zend/zend_alloc.c
+++ b/Zend/zend_alloc.c
@@ -386,10 +386,12 @@ ZEND_API int zend_set_memory_limit(unsigned int memory_limit)
ZEND_API void start_memory_manager(ALS_D)
{
+#if 0
#ifndef ZTS
int i, j;
void *cached_entries[MAX_CACHED_MEMORY][MAX_CACHED_ENTRIES];
#endif
+#endif
AG(phead) = AG(head) = NULL;
@@ -454,6 +456,9 @@ ZEND_API void shutdown_memory_manager(int silent, int clean_cache)
for (i=1; i<MAX_CACHED_MEMORY; i++) {
for (j=0; j<AG(cache_count)[i]; j++) {
+#if MEMORY_LIMIT
+ AG(allocated_memory) -= REAL_SIZE(ptr->size);
+#endif
ptr = (zend_mem_header *) AG(cache)[i][j];
REMOVE_POINTER_FROM_LIST(ptr);
free(ptr);