Trying to mount -a on a linux system with windows share was giving me the following error

mount: Cannot allocate memory

The problem seems to be on Windows system where share is located. Quick and temporary workaround is to restar Lanmanserver service and retry mount -a.

Permanent fix that should help is to edit a registry setting and restart the service as below:

reg add HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters /v Size /t REG_DWORD /d 3 /f
sc stop LanmanServer
sc start LanmanServer