[refac][fix] makes the library to use less stack memory
[refac][fix] makes the library to use less stack memory

foss-for-synopsys-dwc-arc-processors/libxively,foss-for-synopsys-dwc-arc-processors/libxively