Reworked the estream memory buffer allocation.