summaryrefslogtreecommitdiff
path: root/Zend/zend_alloc.c
diff options
context:
space:
mode:
authorAndi Gutmans <andi@php.net>2001-04-28 15:45:50 +0000
committerAndi Gutmans <andi@php.net>2001-04-28 15:45:50 +0000
commit429aed9066fdd1b374a93a6f67719612a08af7e1 (patch)
tree50ceef72347e91d8d61bcd31198a0010fedda73b /Zend/zend_alloc.c
parent4175151567db7b29aa1fa67d842c6836d7696fda (diff)
downloadphp-git-429aed9066fdd1b374a93a6f67719612a08af7e1.tar.gz
- Don't add/remove cached memory blocks from blocks list as this will slow
- down performance a bit.
Diffstat (limited to 'Zend/zend_alloc.c')
-rw-r--r--Zend/zend_alloc.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c
index fc2a3098a4..8891ef81f2 100644
--- a/Zend/zend_alloc.c
+++ b/Zend/zend_alloc.c
@@ -145,9 +145,6 @@ ZEND_API void *_emalloc(size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
p->persistent = 0;
p->cached = 0;
p->size = size;
- HANDLE_BLOCK_INTERRUPTIONS();
- ADD_POINTER_TO_LIST(p);
- HANDLE_UNBLOCK_INTERRUPTIONS();
return (void *)((char *)p + sizeof(zend_mem_header) + PLATFORM_PADDING);
} else {
#if ZEND_DEBUG
@@ -223,9 +220,6 @@ ZEND_API void _efree(void *ptr ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
#if ZEND_DEBUG
p->magic = MEM_BLOCK_CACHED_MAGIC;
#endif
- HANDLE_BLOCK_INTERRUPTIONS();
- REMOVE_POINTER_FROM_LIST(p);
- HANDLE_UNBLOCK_INTERRUPTIONS();
return;
}
HANDLE_BLOCK_INTERRUPTIONS();
@@ -445,7 +439,7 @@ ZEND_API void shutdown_memory_manager(int silent, int clean_cache)
p=AG(head);
t=AG(head);
while (t) {
- if (!t->cached || clean_cache) {
+ if (!t->cached) {
#if ZEND_DEBUG
if (!t->cached && !t->reported) {
zend_mem_header *iterator;