www.emsdn.com
Class Profile: Home »» Apache [Apache] under "Apache" »»» Netware apr_pool_parent_get

Netware apr_pool_parent_get


/* NetWare, don't return the global_pool, return the application pool
as the top most pool */
if (pool->parent == global_pool)
return NULL;
which doesn't do what it is supposed to do, and doesn't do even what
the comment says. Why does Netware need different semantics for this
function, what's wrong with exposing the global pool?
joe


No. 1# | By Developer Tags User at [2008-5-4] | size: 1649 bytes

5/12/2006 at 3:25 AM, in message
<20060512092529.GA14658 (AT) redhat (DOT) com>, Joe
<jorton (AT) redhat (DOT) comwrote:
/* NetWare, don't return the global_pool, return the application
pool
as the top most pool */
if (pool->parent == global_pool)
return NULL;

which doesn't do what it is supposed to do, and doesn't do even
what
the comment says. Why does Netware need different semantics for this

function, what's wrong with exposing the global pool?

jo

Because the NetWare memory address space is one big memory space that
all running NLMs share. There are no process boundaries within NetWare
and any running NLM could access memory owned by any other running NLM.
Therefore if multiple applications are running on top of a shared
APRLib, the global_pool pointer is the pool pointer to all APR allocated
memory no matter which application actually caused it to be allocated.
So the NetWare APRLib has to emulate a process or application boundary
with APRLib itself. Something that would normally be taken care of by
the operating system. That memory boundary is established in the
NetWare APR by allocating an application specific memory pool (pseudo
global_pool) out of the APR global_pool and then making sure that the
application remains at all time within its own allocated application
memory pool. This code is simply not allowing an APR application to
walk the memory pool hierarchy all the way back to the global_pool since
the global_pool is truely global to all NLMs running on APR.

Brad



Apache Hot!

Apache New!


Copyright © 2008 www.emsdn.com • All rights reserved • CMS Theme by www.emsdn.com - 0.391