# How to access 512KB Battery-Backable SRAM in RCM 6760

**URL:** <https://forums.digi.com/t/how-to-access-512kb-battery-backable-sram-in-rcm-6760/16288>\
**Category:** Rabbit Software\
**Tags:** ram, rcm6760-512kb-batter\
**Created:** [February 19, 2016, 8:06am UTC](https://forums.digi.com/t/how-to-access-512kb-battery-backable-sram-in-rcm-6760/16288 "2016-02-19T08:06:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sshamali](https://avatars.discourse-cdn.com/v4/letter/s/ecc23a/32.png) [@sshamali](https://forums.digi.com/u/sshamali)\
**Post date:** [February 19, 2016, 8:06am UTC](https://forums.digi.com/t/how-to-access-512kb-battery-backable-sram-in-rcm-6760/16288/1 "2016-02-19T08:06:40Z")

</div>

Hi.  
I tried to use \_xalloc and XALLOC\_BB in parameter3 but it doesn’t work and gave me the error bellow :

Run Time Error:Xmem allocation failed (out of memory)…  
file:MEM.LIB  
function: \_xalloc  
line:400

I’m trying to allocate 15000 bytes.

pszGER = \_xalloc(szGER+szNOME+szTD+szSet+szL1L2+szSR+szER+szVIR+szCC+szAER+szANA+szFER,0, XALLOC\_BB);

---

<div class="post-metadata">

**Author:** ![petermcs](https://avatars.discourse-cdn.com/v4/letter/p/4af34b/32.png) [@petermcs](https://forums.digi.com/u/petermcs)\
**Post date:** [February 19, 2016, 8:40am UTC](https://forums.digi.com/t/how-to-access-512kb-battery-backable-sram-in-rcm-6760/16288/2 "2016-02-19T08:40:21Z")

</div>

The first parameter for \_xalloc is a pointer to an long integer as the function may return a larger block and will update the long at that location with the actual amount allocated so you should have something like:

long block\_size;

block\_size = szGER+szNOME+szTD+szSet+szL1L2+szSR+szER+szVIR+szCC+szAER+szANA+szFER;

pszGER = \_xalloc(&block\_size,0, XALLOC\_BB);

Regards,  
Peter
