# How to allocate an array in extended memory?

**URL:** <https://forums.digi.com/t/how-to-allocate-an-array-in-extended-memory/10178>\
**Category:** Rabbit\
**Created:** [October 24, 2008, 3:46pm UTC](https://forums.digi.com/t/how-to-allocate-an-array-in-extended-memory/10178 "2008-10-24T15:46:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![samson](https://avatars.discourse-cdn.com/v4/letter/s/b77776/32.png) [@samson](https://forums.digi.com/u/samson)\
**Post date:** [October 24, 2008, 3:46pm UTC](https://forums.digi.com/t/how-to-allocate-an-array-in-extended-memory/10178/1 "2008-10-24T15:46:19Z")

</div>

Hi,

I can store and extract memory in extended memory using something like “xdata name3 {” Rules! “};” to define the memory. I want to use this for a datalog, so I need a large abount of space. I could do this by just defining a large string, and then using that space. There must be a better way. Can anyone tell me?

For avoidance of doubt, I want to do instead of:

xdata name3 {" Rules! "};

something the equivalent of:

xdata name3 {char[9]};

but where 9 is more like 20,000.

I am doing this on a RCM4000 using Dynamic C 10.40

---

<div class="post-metadata">

**Author:** ![abhilash.pk](https://avatars.discourse-cdn.com/v4/letter/a/d6d6ee/32.png) [@abhilash.pk](https://forums.digi.com/u/abhilash.pk)\
**Post date:** [October 25, 2008, 9:59am UTC](https://forums.digi.com/t/how-to-allocate-an-array-in-extended-memory/10178/2 "2008-10-25T09:59:11Z")

</div>

Hello Samson,  
Since you are using 4000 series of processor and dc10.xx, you can easily allocate memeory from xmem by using the far key word  
Eg: //x is an integer variable in xmem  
// y is also an integer variable in xmem  
static far int x;  
static int far y;

i think this will clear your doubt,  
regrds  
Aby
