implement the RAM usage limitation