[Date Prev][Date Next] [Chronological] [Thread] [Top]

RE: openldap on AIX 4

>We may be using the wrong BDB interface here. We use DB_ENV->set_alloc()
>which only affects some of BDB's mallocs. I believe this is only for the case
>where BDB returns malloc'd DBT content to the app. There is another
>interface, db_env_set_func_malloc() which replaces BDB's use of malloc
>globally, i.e., for its own internal mallocs as well as for anything it hands
>back to the app. Is there any down side to using ber_memalloc for everything?
>Also looking over the BDB doc makes me wonder if we should be using
>db_env_set_func_yield or db_env_set_func_sleep as well. Thoughts?

Unless there's a significant performance impact incurred by using an
allocator globally (for example, under DCE/RPC, rpc_ss_allocate() is 
definitely not interchangeable with malloc() and is somewhat slower)
then I think there exists a strong argument for using the same allocator
everywhere. (Think debugging and performance; I know of a commercial
directory vendor that pretty much just changed the malloc library and
increased the version number a whole major version :-))

-- Luke

Luke Howard | lukehoward.com
PADL Software | www.padl.com