You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Chris Knight <Ch...@nasa.gov> on 2003/09/12 20:43:48 UTC

pool interface for shared memory?

(If this has been discussed previously, I apologize. Is there an archive 
for this mailing list somewhere?)

I would like to use the multitude of apr tools (hashes, lists, etc) to 
interact with shared memory, but alas it appears there's no way to do so 
(as I can't implement my own allocator.) Am I incorrect in this 
assessment (and if so, how would I create a pool on top of shared 
memory?) If I am correct, would providing such an interface be generally 
useful and a good/bad idea?


Re: pool interface for shared memory?

Posted by Aaron Bannert <aa...@clove.org>.
On Friday, September 12, 2003, at 12:37  PM, Chris Knight wrote:

> Alas, I do need a full-fledged pool interface (in fact, I need it to 
> be the same pool interface so I can hand it wrapped in an apr_pool_t 
> to apr_hash_create and the like.

Take a look at how mod_ssl-2.0 does this kind of stuff. It manages
session keys in a shared hash table, IIRC.

-aaron


Re: pool interface for shared memory?

Posted by Anthony Howe <ac...@snert.com>.
Sander Striker wrote:

>>From: Chris Knight [mailto:Christopher.D.Knight@nasa.gov]
>>Sent: Friday, September 12, 2003 9:38 PM
> 
> 
>>Alas, I do need a full-fledged pool interface (in fact, I need it to be 
>>the same pool interface so I can hand it wrapped in an apr_pool_t to 
>>apr_hash_create and the like.
> 
> 
> Sorry, this is not possible at this time.  There is only one implementation
> of the pools API, and that's probably not going to change anytime soon.

Too bad that. A pool interface for shared memory would be really nice. 
I could use it in mod_watch, mod_require_host, (and probably one day in 
mod_throttle) where I had to roll my own shared hash table structure.

-- 
Anthony C Howe                                 +33 6 11 89 73 78
http://www.snert.com/       ICQ: 7116561         AIM: Sir Wumpus
"                                                " - Zen thought


RE: pool interface for shared memory?

Posted by Cliff Woolley <jw...@virginia.edu>.
On Fri, 12 Sep 2003, Sander Striker wrote:

> In the past we've worked on pluggable memory systems, but the
> performance penalty of our implementation was to high at the time.
> If you are interested in that part of history, search around in the
> mail archives for SMS, smart/stackable memory system.

Ahh yes, SMS.  Reminds me of you and lkcl and samba-tng.  :)

Chris: to add to Sander's comment, you can find the source for SMS as of
the time it was abandoned 23 months ago (wow, was it that long?) at
http://cvs.apache.org/viewcvs.cgi/apr/memory/unix/Attic/

--Cliff

RE: pool interface for shared memory?

Posted by Sander Striker <st...@apache.org>.
> From: Chris Knight [mailto:Christopher.D.Knight@nasa.gov]
> Sent: Friday, September 12, 2003 9:38 PM

> Alas, I do need a full-fledged pool interface (in fact, I need it to be 
> the same pool interface so I can hand it wrapped in an apr_pool_t to 
> apr_hash_create and the like.

Sorry, this is not possible at this time.  There is only one implementation
of the pools API, and that's probably not going to change anytime soon.
In the past we've worked on pluggable memory systems, but the
performance penalty of our implementation was to high at the time.
If you are interested in that part of history, search around in the
mail archives for SMS, smart/stackable memory system.

Maybe we can experiment with allocators that have vtables (for alloc and
free) in the future.


Sander

Re: pool interface for shared memory?

Posted by Chris Knight <Ch...@nasa.gov>.
Alas, I do need a full-fledged pool interface (in fact, I need it to be 
the same pool interface so I can hand it wrapped in an apr_pool_t to 
apr_hash_create and the like.

Aaron Bannert wrote:

> If you don't need a full-fledged pool interface, but just malloc/free,
> take a look at apr_rmm.h (in apr-util/include/). There's also an
> exmaple in the apr-util examples, IIRC.
>
> -aaron
>
>
> On Friday, September 12, 2003, at 11:43  AM, Chris Knight wrote:
>
>> (If this has been discussed previously, I apologize. Is there an 
>> archive for this mailing list somewhere?)
>>
>> I would like to use the multitude of apr tools (hashes, lists, etc) 
>> to interact with shared memory, but alas it appears there's no way to 
>> do so (as I can't implement my own allocator.) Am I incorrect in this 
>> assessment (and if so, how would I create a pool on top of shared 
>> memory?) If I am correct, would providing such an interface be 
>> generally useful and a good/bad idea?
>



Re: pool interface for shared memory?

Posted by Aaron Bannert <aa...@clove.org>.
If you don't need a full-fledged pool interface, but just malloc/free,
take a look at apr_rmm.h (in apr-util/include/). There's also an
exmaple in the apr-util examples, IIRC.

-aaron


On Friday, September 12, 2003, at 11:43  AM, Chris Knight wrote:

> (If this has been discussed previously, I apologize. Is there an 
> archive for this mailing list somewhere?)
>
> I would like to use the multitude of apr tools (hashes, lists, etc) to 
> interact with shared memory, but alas it appears there's no way to do 
> so (as I can't implement my own allocator.) Am I incorrect in this 
> assessment (and if so, how would I create a pool on top of shared 
> memory?) If I am correct, would providing such an interface be 
> generally useful and a good/bad idea?