Skip to content
Commit f7c4fe67 authored by Nicolas Pitre's avatar Nicolas Pitre Committed by Carles Cufí
Browse files

shell: optimize history storage a bit



When padding is added to "fill" the gap in order to wrap to the
beginning of the ring buffer, such padding is attributed to the
current item being added. Let's attribute it to the previous entry
instead so it'll be freed along with that entry and make the space
available one entry sooner, increasing the chances for keeping the
current entry around longer.

If ring buffer is empty then always reset it up front to get best
alignment right away i.e. beginning of buffer.

Signed-off-by: default avatarNicolas Pitre <npitre@baylibre.com>
parent 082ca85b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment