add maxsize to keep track of total buffer size

maxsize is the maximum size of shares, used for allocation.  size will
be the current processing size of shares.
allow processing size to be changed