one thing that may or may not help with a voltage sweep is to disable the default log_damping in the example scripts.
https://forum.devsim.org/t/memory-leak-after-devsim-solve/348/2?u=juan
opts = get_equation_command(name="PotentialEquation", device=device, region=region)
opts['variable_update']="default"
equation(**opts)