diff options
| author | Andi Gutmans <andi@php.net> | 2000-06-09 16:08:30 +0000 |
|---|---|---|
| committer | Andi Gutmans <andi@php.net> | 2000-06-09 16:08:30 +0000 |
| commit | 605b1aa3943718c610d3fc3c2af128aa8f7cb972 (patch) | |
| tree | 415ef58b27eeee6de59aecc9757b700c09ff86b6 /Zend/zend_alloc.c | |
| parent | 9fb095b50eb11429ebcb9a0d93ab48ae468a6c91 (diff) | |
| download | php-git-605b1aa3943718c610d3fc3c2af128aa8f7cb972.tar.gz | |
- Fix cache initialization
Diffstat (limited to 'Zend/zend_alloc.c')
| -rw-r--r-- | Zend/zend_alloc.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c index 02c7030ce0..551100ad46 100644 --- a/Zend/zend_alloc.c +++ b/Zend/zend_alloc.c @@ -363,7 +363,6 @@ ZEND_API void start_memory_manager(ALS_D) memset(AG(fast_cache_list_head), 0, sizeof(AG(fast_cache_list_head))); memset(AG(cache_count),0,MAX_CACHED_MEMORY*sizeof(unsigned char)); -#if 0 /* FIXME: Need to allocate the right amount of memory now */ #ifndef ZTS /* Initialize cache, to prevent fragmentation */ /* We can't do this in ZTS mode, because calling emalloc() from within start_memory_manager() @@ -371,7 +370,7 @@ ZEND_API void start_memory_manager(ALS_D) */ for (i=1; i<MAX_CACHED_MEMORY; i++) { for (j=0; j<MAX_CACHED_ENTRIES; j++) { - cached_entries[i][j] = emalloc(i); + cached_entries[i][j] = emalloc(8*i); } } for (i=1; i<MAX_CACHED_MEMORY; i++) { @@ -380,7 +379,6 @@ ZEND_API void start_memory_manager(ALS_D) } } #endif -#endif } |
