additional checking whether memory is sufficient