JDiet: Footprint Reduction for Memory-Constrained Systems