cvs: Zend / zend.c zend_ini.c zend_ini.h
| From: | Zeev Suraski | Date: | Tue, 07 Jan 2003 15:56:52 +0000 |
| Subject: | cvs: Zend / zend.c zend_ini.c zend_ini.h | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-761@lists.php.net to get a copy of this message | ||
zeev Tue Jan 7 10:56:52 2003 EDT
Modified files:
/Zend zend.c zend_ini.c zend_ini.h
Log:
Streamline leak fixes
Index: Zend/zend.c
diff -u Zend/zend.c:1.168 Zend/zend.c:1.169
--- Zend/zend.c:1.168 Thu Jan 2 09:59:11 2003
+++ Zend/zend.c Tue Jan 7 10:56:51 2003
@@ -615,27 +615,12 @@
free(GLOBAL_AUTO_GLOBALS_TABLE);
zend_shutdown_extensions(TSRMLS_C);
free(zend_version_info);
-#ifndef ZTS
- zend_shutdown_constants();
-#endif
-#ifdef NETWARE
- /* All the below lines added to remove memory leaks!
- * They all add up to a big no. Wondering how come it is missed in the original code!
- */
- /* Removes a leak of 160 bytes */
- destroy_zend_class(&zend_standard_class_def); /* Destroys the hash tables also */
- /* Removes a leak of 56 bytes */
- zend_hash_destroy(&EG(persistent_list));
- /* Removes a leak of 20,440 bytes */
- zend_hash_destroy(EG(zend_constants));
- /* Removes a leak of 56 bytes */
- free(EG(zend_constants));
- /* Removes a leak of 20,440 bytes */
zend_hash_destroy(GLOBAL_CONSTANTS_TABLE);
- /* Removes a leak of 56 bytes */
free(GLOBAL_CONSTANTS_TABLE);
- /* Removes a leak of 496 bytes */
-#endif /* NetWare */
+//#ifdef ZTS
+// compiler_globals_dtor(ts_resource(compiler_globals_id) TSRMLS_CC);
+// executor_globals_dtor(ts_resource(executor_globals_id) TSRMLS_CC);
+//#endif
}
Index: Zend/zend_ini.c
diff -u Zend/zend_ini.c:1.25 Zend/zend_ini.c:1.26
--- Zend/zend_ini.c:1.25 Tue Dec 31 10:55:03 2002
+++ Zend/zend_ini.c Tue Jan 7 10:56:51 2003
@@ -78,7 +78,15 @@
ZEND_API int zend_ini_shutdown(TSRMLS_D)
{
zend_hash_destroy(EG(ini_directives));
+ free(EG(ini_directives));
return SUCCESS;
+}
+
+
+ZEND_API zend_ini_global_shutdown()
+{
+ zend_hash_destroy(registered_zend_ini_directives);
+ free(registered_zend_ini_directives);
}
Index: Zend/zend_ini.h
diff -u Zend/zend_ini.h:1.22 Zend/zend_ini.h:1.23
--- Zend/zend_ini.h:1.22 Tue Dec 31 10:55:03 2002
+++ Zend/zend_ini.h Tue Jan 7 10:56:51 2003
@@ -84,6 +84,7 @@
ZEND_API int zend_ini_startup(TSRMLS_D);
ZEND_API int zend_ini_shutdown(TSRMLS_D);
+ZEND_API int zend_ini_global_shutdown();
ZEND_API int zend_ini_deactivate(TSRMLS_D);
ZEND_API int zend_copy_ini_directives(TSRMLS_D);