[PATCH v2] Introduce a function to get reserved memory size