Memory allocation or algorithm optimisation to reduce hardware requirements