new ovdb release, plus a bunch of other patches

Heath Kehoe hakehoe at norand.com
Thu Jan 13 22:26:42 UTC 2000


Buffindexed and ov3 use mmap to bring in the overview data in
_opensearch(), and _search() returns pointers to that mmap'ed
space.  So, effectively, the overview data is static during
the search.  But ovdb doesn't have that luxury; with each key
retrieval in ovdb_search(), I can either use static memory
which gets reused with each call to search, or I can have it
malloc() a new space for each call.

The question is, when can I free() those spaces?  If I wait
until closesearch to free, that leaves the possibility that
readers could malloc() huge amounts of memory if they are
searching a large group.  I should instead keep a queue of
keys; and free the oldest ones after the queue gets longer
than IOV_MAX (which is when SendIOv calls PushIOv).  It's
a pain, but I could do it.

--heath



>In article <200001122003.OAA20470 at darkside.norand.com>,
>	Heath Kehoe <hakehoe at norand.com> wrote;
>
>} As an additional incentive, there are additional fixes in there not
>} related to ovdb:
>
>You've used SendIOb() instead of SendIOv() in
>nnrpd/article.c  Maybe this is because ovdb
>returns static area at OVsearch(), I've not
>yet seen ovdb the code although.  I think this
>can be resolved in ovdb like buffindexed does.
>It allocates a big buffer in buffindexed_opensearch(),
>returns address in the area in buffindexd_search()
>and frees it at buffindexed_closesearch().
>Can you modify the ovdb code to do so?
>-- 
>Katsuhiro Kondou
>
>
>




More information about the inn-workers mailing list