Error Code 12: Cannot allocate memory (readdir_r) while syncing

Asked by Norbert on 2014-09-13

Hello, Zenju!

Thank you for FreeFileSync program. I'm using it on Ubuntu 12.04.5 x86_64 with FFS 5.21.

I use FFS for syncing between my external USB drive (NTFS formatted) and some folders from internal HDD (ext4 formatted).
It worked like expected, but today I get an error message while syncing:

     Cannot enumerate directory '/media/NTFS/some_folder'.
     Error Code 12: Cannot allocate memory (readdir_r)

If I ignore this error, FFS found 700159 elements and syncs them normally.
The directory '/media/NTFS/some_folder' contains 105177 files for 1.8 Gb (from 4 to 60 Kb per file).

The parent drive of a directory is mounted by ntfs-3g (fuseblk).

Which program produces 'Error Code 12: Cannot allocate memory (readdir_r)' error? Is this behaviour comes from FFS or from ntfs-3g? How can solve the problem?

Question information

English Edit question
FreeFileSync Edit question
No assignee Edit question
Solved by:
Last query:
Last reply:
Norbert (nrbrtx) said : #1

My machine has 8 Gb of RAM, 4 Gb is free during FFS sync.
So there is enough free memory.

Best Zenju (zenju) said : #2

The error message is coming directly from the system call "readdir_r". As for all failed memory allocations there are to main causes: 1. not enough total memory. 2. not enough contiguous memory. If your memory was highly fragmented at the time of the error, you may have suffered from 2.

Norbert (nrbrtx) said : #3

Thanks Zenju, that solved my question.