Should RAM be checked or the Flash memory for reference?
Yes.
You need to check that there is enough of each.