[Pvfs2-developers] BMI_testunexpected and free

Sam Lang slang at mcs.anl.gov
Fri Aug 18 19:44:29 EDT 2006


Hi all,

More bmi questions... :-)

The BMI_testeunexpected call returns a list of BMI_unexpected_info  
structs.  Each of these has a buffer that's been allocated by the bmi  
method internally.  It looks like that buffer gets freed in  
server_state_machine_complete (pvfs2-server.c) with a call to free  
(also gets freed on an error).  Two questions:

1.  Should BMI_memfree be used instead of free, since the allocation  
is done in the specific bmi method?

2.  Could the free of that buffer occur in  
server_state_machine_start, right after the call to PINT_decode?  It  
doesn't look like the buffer is used after that, and it might allow  
the bmi method to reuse buffers better if it handles unexpected  
messages that way.  At the least, it might reduce the server's  
footprint a little under heavy load.

-sam


More information about the Pvfs2-developers mailing list