A new CODING_STANDARDS patch is attached, based on feedback from Andi
and Dan (thanks!). Please review and comment.
--
Jon Parise ([EMAIL PROTECTED]) :: The PHP Project (http://www.php.net/)
Index: CODING_STANDARDS
===================================================================
RCS file: /repository/php4/CODING_STANDARDS,v
retrieving revision 1.22
diff -u -r1.22 CODING_STANDARDS
--- CODING_STANDARDS 9 Sep 2002 07:54:11 -0000 1.22
+++ CODING_STANDARDS 9 Oct 2002 13:41:35 -0000
@@ -122,6 +122,20 @@
existing. End users should use function_exists() to test for the
existence of a function
+[11] Prefer emalloc(), efree(), estrdup(), etc. to their standard C library
+ counterparts. These functions implement an internal "safety-net"
+ mechanism that ensures the deallocation of any unfreed memory at the
+ end of a request. They also provide useful allocation and overflow
+ information while running in debug mode.
+
+ In almost all cases, memory returned to the engine must be allocated
+ using emalloc().
+
+ malloc() should only be used in instances where you need to allocate
+ memory that will be freed (via free()) inside of a third-party library.
+ It should also be used in instances where allocated memory has to
+ survive between multiple requests.
+
Naming Conventions
------------------
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php