hal: disable unused feature to reduce memory footprint

    - Disable feature flags which are not needed to reduce memory
      footprint.
    - Release any unused memory once use case is over.

Change-Id: I7854b8f00748f204f38b08b9dfa3c00b2bbe0c2b
(cherry picked from commit a65e5b966816fa7168105e4d4e7ec1de83240ec9)
5 files changed