cvs: Zend / zend_alloc.c zend_alloc.h zend_globals.h

From: Date: Sat, 22 Jun 2002 14:25:28 +0000
Subject: cvs: Zend / zend_alloc.c zend_alloc.h zend_globals.h
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-183@lists.php.net to get a copy of this message
andi Sat Jun 22 10:25:28 2002 EDT Modified files: /Zend zend_alloc.c zend_alloc.h zend_globals.h Log: - Completely nuke the persist_alloc() stuff Index: Zend/zend_alloc.c diff -u Zend/zend_alloc.c:1.98 Zend/zend_alloc.c:1.99 --- Zend/zend_alloc.c:1.98 Sat Jun 22 10:11:43 2002 +++ Zend/zend_alloc.c Sat Jun 22 10:25:27 2002 @@ -88,10 +88,8 @@ #define REMOVE_POINTER_FROM_LIST(p) \ - if (!p->persistent && p==AG(head)) { \ + if (p==AG(head)) { \ AG(head) = p->pNext; \ - } else if (p->persistent && p==AG(phead)) { \ - AG(phead) = p->pNext; \ } else { \ p->pLast->pNext = p->pNext; \ } \ @@ -100,19 +98,11 @@ } #define ADD_POINTER_TO_LIST(p) \ - if (p->persistent) { \ - p->pNext = AG(phead); \ - if (AG(phead)) { \ - AG(phead)->pLast = p; \ - } \ - AG(phead) = p; \ - } else { \ - p->pNext = AG(head); \ - if (AG(head)) { \ - AG(head)->pLast = p; \ - } \ - AG(head) = p; \ + p->pNext = AG(head); \ + if (AG(head)) { \ + AG(head)->pLast = p; \ } \ + AG(head) = p; \ p->pLast = (zend_mem_header *) NULL; #define DECLARE_CACHE_VARS() \ @@ -152,7 +142,6 @@ AG(cache_stats)[CACHE_INDEX][1]++; memcpy((((char *) p) + sizeof(zend_mem_header) + MEM_HEADER_PADDING + size), &mem_block_end_magic, sizeof(long)); #endif - p->persistent = 0; p->cached = 0; p->size = size; return (void *)((char *)p + sizeof(zend_mem_header) + MEM_HEADER_PADDING); @@ -177,7 +166,7 @@ HANDLE_UNBLOCK_INTERRUPTIONS(); return (void *)p; } - p->persistent = p->cached = 0; + p->cached = 0; ADD_POINTER_TO_LIST(p); p->size = size; /* Save real size for correct cache output */ #if ZEND_DEBUG @@ -228,7 +217,7 @@ #endif if (!ZEND_DISABLE_MEMORY_CACHE - && !p->persistent && (CACHE_INDEX < MAX_CACHED_MEMORY) && (AG(cache_count)[CACHE_INDEX] < MAX_CACHED_ENTRIES)) { + && (CACHE_INDEX < MAX_CACHED_MEMORY) && (AG(cache_count)[CACHE_INDEX] < MAX_CACHED_ENTRIES)) { AG(cache)[CACHE_INDEX][AG(cache_count)[CACHE_INDEX]++] = p; p->cached = 1; #if ZEND_DEBUG @@ -387,7 +376,7 @@ #endif #endif - AG(phead) = AG(head) = NULL; + AG(head) = NULL; #if MEMORY_LIMIT AG(memory_limit) = 1<<30; /* ridiculous limit, effectively no limit */ Index: Zend/zend_alloc.h diff -u Zend/zend_alloc.h:1.37 Zend/zend_alloc.h:1.38 --- Zend/zend_alloc.h:1.37 Sat Jun 22 10:11:43 2002 +++ Zend/zend_alloc.h Sat Jun 22 10:25:27 2002 @@ -45,8 +45,7 @@ #endif struct _zend_mem_header *pNext; struct _zend_mem_header *pLast; - unsigned int size:30; - unsigned int persistent:1; + unsigned int size:31; unsigned int cached:1; } zend_mem_header; Index: Zend/zend_globals.h diff -u Zend/zend_globals.h:1.85 Zend/zend_globals.h:1.86 --- Zend/zend_globals.h:1.85 Wed Jun 5 05:57:43 2002 +++ Zend/zend_globals.h Sat Jun 22 10:25:27 2002 @@ -213,7 +213,6 @@ struct _zend_alloc_globals { zend_mem_header *head; /* standard list */ - zend_mem_header *phead; /* persistent list */ void *cache[MAX_CACHED_MEMORY][MAX_CACHED_ENTRIES]; unsigned int cache_count[MAX_CACHED_MEMORY]; void *fast_cache_list_head[MAX_FAST_CACHE_TYPES];

« previous php.zend-engine.cvs (#183) next »