[PATCH v2 0/2] Add generic function for computing ram_top