At 12:55 AM 6/9/2002, Brian Pane wrote:
>I just looked through zend_alloc.c.  It looks like the HeapCreate only
>happens once, at startup--did I get that right?

It's called on the per-thread startup (start_memory_manager(), which is 
called from alloc_globals_ctor(), which is the per-thread allocation 
'constructor').

>  For PHP processing, do
>you need a memory heap that is created at startup and used by all requests,
>or is it sufficient to create and destroy a private heap for each request?

We can go either way, but won't allocating and freeing these heaps increase 
fragmentation?  Remember that PHP functions will also allocate memory 
outside these heaps (in 3rd party libraries).

>If it's the latter, then we can probably figure out a way to have the PHP
>allocator grab memory from the Apache request's pool.  But if it's the
>former (a heap used by many requests), then the problem isn't as easy to
>solve.

We can give it a try certainly, to see if we're in the right direction.  I 
think that in a real world situation, though, it may result in a 
fragmentation problem.

Zeev


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to