From looking at the elf files, it seems to me there is enough RAM:
LIB uses ~1k, of which 512 bytes is the Data_Buffer for writing to the SD card.
APP uses ~8k, of which 6k is the Scan_Buffer where the samples are stored.
The stack has currently 1k allocated in the linker script.