Example to restric a proccess to use a memory for limited number of times