Created by: DannyIsFunny
[Issue] Malloc will memset
the malloced space automatically, which has caused that once mutable_data
is called both virtual and physical memory will be occupied.
After removing memset
from Malloc<host>
implementation, only virtual space will be created when tensor->mutable_data
is applied, and the corresponding physical memory space will not be allocated until corresponding data is inputed.
[Effect of Current PR]
500KB memory usage has been reduced (7MB in total ) on v45 model in our experiment on Android mobile