change memory allocating