Character deletion in buffer does not affect it's maximum size. It does not shrink even when the buffer current size reduces to 0. This can waste a lot of memory. We need to reallocate the buffer so as to shrink it after certain decrease in current size. That is we need to store the ratio of current size to max size maybe.
Character deletion in buffer does not affect it's maximum size. It does not shrink even when the buffer current size reduces to 0. This can waste a lot of memory. We need to reallocate the buffer so as to shrink it after certain decrease in current size. That is we need to store the ratio of current size to max size maybe.