Home/Support/Support Forum/fat_AutoMount causing Run Time Error : Xmem allocation failure (out of memory)..
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

fat_AutoMount causing Run Time Error : Xmem allocation failure (out of memory)..

0 votes
I'm currently using an RCM3110 with 128K SRAM & 256K FLASH

I have successfully connected an 2GB SD card to my board and configured the libraries to communicate with it.

However, when attempting to run any application with mounts the file system using fat_AutoMount(), I receive ' Run Time Error : Xmem allocation failure (out of memory)..'

I have tried running the following sample programs:
- FAT_SHELL.C
- Fmt_Device.C
- fat_create.C

All to no avail.. does the RCM3110 simply not have enough memory space to work with an SD card and the FAT file system?

How can I find out how much memory is actually required to perform the fat_AutoMount operation versus what I have available?

Thanks for any guidance..
asked Apr 17, 2017 in Rabbit Software by dilbertgod New to the Community (18 points)

Please log in or register to answer this question.

1 Answer

0 votes
 
Best answer
You could single-step in the debugger to find where the allocation fails and see how much memory it's requesting, or modify the xalloc() calls to print the size of the request.

You could also try running your code on an RCM3100 to see if it has enough RAM to cover the xalloc() call. If not, I would suspect a bug in the SD card library related to using 2GB cards.
answered Apr 19, 2017 by TomCollins Veteran of the Digi Community (1,439 points)
selected Apr 19, 2017 by dilbertgod
Tom, I actually ended up switching to the RCM3100 and my problems disappeared. I never did get the chance to perform the initial steps you suggested, but it's good information to keep in mind for the future.

Thanks for taking the time to respond, I appreciate it
...