[MPICH2-dev] Minor bug in handlemem.c?
    David Gingold 
    david.gingold at sicortex.com
       
    Tue Nov  1 15:51:53 CST 2005
    
    
  
I just noticed this in handlemem.c:
In MPIU_Handle_obj_alloc(), we call MPIU_Handle_indirect_init() as  
follows:
         ptr = MPIU_Handle_indirect_init(&objmem->indirect,
                         &objmem->indirect_size,
                         HANDLE_BLOCK_SIZE,
                         HANDLE_BLOCK_INDEX_SIZE,
                         objsize,
                         objkind);
However, MPIU_Handle_indirect_init() works as follows:
static void *MPIU_Handle_indirect_init( void *(**indirect)[],
                     int *indirect_size,
                     int indirect_max_size,
                     int indirect_block_size, int obj_size,
                     int handle_type )
The third and fourth arguments in the caller are reversed, no?
Given the existing definitions of HANDLE_BLOCK_SIZE and  
HANDLE_BLOCK_INDEX_SIZE, I don't think this results in an actual  
failure -- the index still fits in ten bits.  But it seems to be not  
what the writer intended.
-dg
--
David Gingold
Principal Software Engineer
SiCortex
One Clock Tower Place, Suite 100
Maynard MA 01754
(978) 897-0214 x224
    
    
More information about the mpich2-dev
mailing list