tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: fs-independent quotas



>>> Nor in the tree-based dictionnary, or in the multidimentionnal array.
>> No, in an array the unused locations do exist.
> I don't understand this.  If you have a 2-dimention array
> quota[id][type], and quota[class=group] doesn't exist for this
> filesytem, you have quota[class=group]=NULL and no memory associated
> with it.

Not no memory.  The memory for that pointer, the one that's nil, still
exists.

If you use an array, representing a quota for id=0 and a quota for
id=999999 requires 1000000 array elements, even if 999998 of them are
nil.  With a suitable sparse data structure, the memory cost
is..substantially lower.

/~\ The ASCII                             Mouse
\ / Ribbon Campaign
 X  Against HTML                mouse%rodents-montreal.org@localhost
/ \ Email!           7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


Home | Main Index | Thread Index | Old Index