File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -655,9 +655,10 @@ static void compiler_globals_ctor(zend_compiler_globals *compiler_globals) /* {{
655
655
compiler_globals -> map_ptr_last = global_map_ptr_last ;
656
656
if (compiler_globals -> map_ptr_last ) {
657
657
/* Allocate map_ptr table */
658
+ void * base ;
658
659
compiler_globals -> map_ptr_size = ZEND_MM_ALIGNED_SIZE_EX (compiler_globals -> map_ptr_last , 4096 );
659
660
base = pemalloc (compiler_globals -> map_ptr_size * sizeof (void * ), 1 );
660
- ZEND_MAP_PTR_SET_BASE ( base );
661
+ ZEND_MAP_PTR_SET_REAL_BASE ( compiler_globals -> map_ptr_base , base );
661
662
memset (base , 0 , compiler_globals -> map_ptr_last * sizeof (void * ));
662
663
}
663
664
#else
@@ -914,7 +915,7 @@ int zend_startup(zend_utility_functions *utility_functions) /* {{{ */
914
915
*/
915
916
CG (map_ptr_size ) = 1024 * 1024 ; // TODO: initial size ???
916
917
CG (map_ptr_last ) = 0 ;
917
- ZEND_MAP_PTR_SET_BASE ( pemalloc (CG (map_ptr_size ) * sizeof (void * ), 1 ));
918
+ ZEND_MAP_PTR_SET_REAL_BASE ( CG ( map_ptr_base ), pemalloc (CG (map_ptr_size ) * sizeof (void * ), 1 ));
918
919
# elif ZEND_MAP_PTR_KIND == ZEND_MAP_PTR_KIND_PTR_OR_OFFSET
919
920
/* Map region is going to be created and resized at run-time. */
920
921
ZEND_MAP_PTR_SET_REAL_BASE (CG (map_ptr_base ), NULL );
You can’t perform that action at this time.
0 commit comments