Something like it yes.
But on the other hand, pooling structures like this is perhaps a bit
overkill.. so just making sure the structure is properly initialized
is also fine.
I thought CossInfo was some structure used relatively often, but now
I realize it is the per cache_dir infor structure we are talking
about. For "static" objects pooling is not a big benefit, but not a
big drawback either (well.. not entirely sure about the effects of
chunked mempools here.. might cause a more negative impact)
Regards
Henrik
On Monday 20 May 2002 22:23, Guido Serassio wrote:
> >Most likely the CossInfo should be pooled.
>
> So, If I understand right MemPools docs, it should be something
> like:
>
> storeFsSetup_coss():
> coss_info_pool = memPoolCreate("COSS info data", sizeof(CossInfo));
>
> storeCossDirParse():
> cs = memPoolAlloc(coss_info_pool);
>
> storeCossDirShutdown():
> memPoolFree(coss_info_pool, cs);
> (now the free of memory is missing)
>
> storeCossDirDone():
> memPoolDestroy(&coss_info_pool);
>
> Regards
>
> Guido
>
> >Regards
> >Henrik
>
> -
> =======================================================
> Serassio Guido
> Via Albenga, 11/4 10134 -
> Torino - ITALY E-mail: guido.serassio@serassio.it
> WWW: http://www.serassio.it
Received on Mon May 20 2002 - 16:04:39 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:15:29 MST