[OpenAFS] crash on AIX 5.2
Douglas E. Engert
deengert@anl.gov
Tue, 11 Jan 2005 13:10:53 -0600
Jim Rees wrote:
> I don't think this is your problem, but this looks wrong to me:
>
> if (inSize > AFS_LRALLOCSIZ) {
> inData = osi_AllocLargeSpace(inSize+1);
> } else {
> inData = osi_AllocLargeSpace(AFS_LRALLOCSIZ);
> }
>
> That first one should be osi_Alloc, not osi_AllocLargeSpace.
Yes that looks like a bug. A few lines later, osi_Free will be used
to free the area. It also looks like insize is not greater then
AFS_LRALLOCSIZE as osi_AllocLargeSize tests for this and would
panic: osi_Panic("osi_AllocLargeSpace: size=%d\n", size);
>
> Also I think this code could use a comment. It's a bit confusing that
> osi_AllocLargeSpace is being used for small allocs, and osi_Alloc is being
> used for large ones.
Looks like osi_AllocLargeSize and osi_FreeLargeSpace will keep a pool of
4K blocks off of freePacketList. Thus any size < 4K get a full 4K. If there
is really a large packet like aticket with a big MS PAC, then 4K may not be
big enough, so osi_Alloc is used directly.
>
> The indentation is wrong, too.
> _______________________________________________
> OpenAFS-info mailing list
> OpenAFS-info@openafs.org
> https://lists.openafs.org/mailman/listinfo/openafs-info
>
>
>
--
Douglas E. Engert <DEEngert@anl.gov>
Argonne National Laboratory
9700 South Cass Avenue
Argonne, Illinois 60439
(630) 252-5444