RE: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_alloc.c zend_alloc.h
| From: | Andi Gutmans | Date: | Sat, 16 Sep 2006 04:53:15 +0000 |
| Subject: | RE: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_alloc.c zend_alloc.h | ||
| References: | 1 | Groups: | php.zend-engine.cvs |
| Request: | Send a blank email to php-zend-engine-cvs+get-5258@lists.php.net to get a copy of this message | ||
We should prefix it with zend_* according to coding standards as this is
exported. zend_is_zend_mm().
> -----Original Message-----
> From: Dmitry Stogov [mailto:dmitry@php.net]
> Sent: Thursday, September 14, 2006 1:55 AM
> To: zend-engine-cvs@lists.php.net
> Subject: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_alloc.c
> zend_alloc.h
>
> dmitry Thu Sep 14 08:55:17 2006 UTC
>
> Modified files:
> /ZendEngine2 zend_alloc.c zend_alloc.h
> Log:
> Added is_zend_mm() to allow runtime check for zend memory manager
>
>
> http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_alloc.c?r1=1.16
> 0&r2=1.161&diff_format=u
> Index: ZendEngine2/zend_alloc.c
> diff -u ZendEngine2/zend_alloc.c:1.160 ZendEngine2/zend_alloc.c:1.161
> --- ZendEngine2/zend_alloc.c:1.160 Thu Aug 31 13:00:12 2006
> +++ ZendEngine2/zend_alloc.c Thu Sep 14 08:55:17 2006
> @@ -18,7 +18,7 @@
>
> +-------------------------------------------------------------
> ---------+
> */
>
> -/* $Id: zend_alloc.c,v 1.160 2006/08/31 13:00:12 dmitry Exp $ */
> +/* $Id: zend_alloc.c,v 1.161 2006/09/14 08:55:17 dmitry Exp $ */
>
> #include "zend.h"
> #include "zend_alloc.h"
> @@ -1619,6 +1619,15 @@
> static zend_alloc_globals alloc_globals; #endif
>
> +ZEND_API int is_zend_mm(TSRMLS_D)
> +{
> +#if ZEND_USE_MALLOC_MM
> + return AG(mm_heap)->use_zend_alloc;
> +#else
> + return 1;
> +#endif
> +}
> +
> ZEND_API void *_emalloc(size_t size ZEND_FILE_LINE_DC
> ZEND_FILE_LINE_ORIG_DC) {
> TSRMLS_FETCH();
> http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_alloc.h?r1=1.73
> &r2=1.74&diff_format=u
> Index: ZendEngine2/zend_alloc.h
> diff -u ZendEngine2/zend_alloc.h:1.73 ZendEngine2/zend_alloc.h:1.74
> --- ZendEngine2/zend_alloc.h:1.73 Tue Jul 25 13:41:08 2006
> +++ ZendEngine2/zend_alloc.h Thu Sep 14 08:55:17 2006
> @@ -17,7 +17,7 @@
>
> +-------------------------------------------------------------
> ---------+
> */
>
> -/* $Id: zend_alloc.h,v 1.73 2006/07/25 13:41:08 dmitry Exp $ */
> +/* $Id: zend_alloc.h,v 1.74 2006/09/14 08:55:17 dmitry Exp $ */
>
> #ifndef ZEND_ALLOC_H
> #define ZEND_ALLOC_H
> @@ -106,6 +106,7 @@
>
> ZEND_API void start_memory_manager(TSRMLS_D); ZEND_API void
> shutdown_memory_manager(int silent, int full_shutdown TSRMLS_DC);
> +ZEND_API int is_zend_mm(TSRMLS_D);
>
> #if ZEND_DEBUG
> ZEND_API int _mem_block_check(void *ptr, int silent
> ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
>
> --
> Zend Engine CVS Mailing List (http://cvs.php.net/) To
> unsubscribe, visit: http://www.php.net/unsub.php
>