RE: [PHP-DEV] zend_mm_set_heap()
| From: | Dmitry Stogov | Date: | Thu, 26 Apr 2007 06:32:41 +0000 |
| Subject: | RE: [PHP-DEV] zend_mm_set_heap() | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-29043@lists.php.net to get a copy of this message | ||
You are not allowed to touch zend_mm internals, but you don't need to do it.
Zend_alloc.c encapsulate all internals structures so it can be
changed/improved/fixed without binary compatibility break.
This is one of advantages of new memory manager.
BTW it allows replace storage backend (see zend_mm_startup_ex()), and usage
of several heaps with provided API (without access to internals).
Dmitry.
> -----Original Message-----
> From: Brian Shire [mailto:shire@facebook.com]
> Sent: Wednesday, April 25, 2007 11:19 PM
> To: Dmitry Stogov
> Cc: 'PHP internals'
> Subject: Re: [PHP-DEV] zend_mm_set_heap()
>
>
> Thanks Dmitry,
>
> I think what I was going for (in a very poorly worded way) was that
> I'm unable to access any of the heap structure values outside of
> zend_alloc.c because that's where the definition resides.
>
> For example something like the following should generate a compile
> time error outside zend_alloc.c:
>
> zend_mm_heap *heap;
> heap->overflow=0;
>
> I've attached a rough patch of what I did to make this accessible
> outside zend_alloc.c.
>
> -shire
>