RAM occupation optimized

Signed-off-by: Aurelio Colosimo <aurelio@aureliocolosimo.it>