# Large size Array in C Model

**URL:** <https://verificationacademy.com/forums/t/large-size-array-in-c-model/29083>\
**Category:** UVM\
**Tags:** UVM, SystemVerilog, systemc\
**Created:** [January 18, 2014, 11:55am UTC](https://verificationacademy.com/forums/t/large-size-array-in-c-model/29083 "2014-01-18T11:55:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kansagaratushar](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/kansagaratushar/32/2381_2.png) [@kansagaratushar](https://verificationacademy.com/forums/u/kansagaratushar)\
**Post date:** [January 18, 2014, 11:55am UTC](https://verificationacademy.com/forums/t/large-size-array-in-c-model/29083/1 "2014-01-18T11:55:29Z")

</div>

Hi,

I am Using C model in my UVM environment.While in C model I have used one multidimensional Array.Please Refer Following Code:

In C File:

**char Memory\_array[2][2][4096][256][16384];**

It gives Simulation Fatal Error due to large size of Array.  
How to solve this problem?

Thanks In Advance.

---

<div class="post-metadata">

**Author:** ![logie](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/l/74df32/32.png) [@logie](https://verificationacademy.com/forums/u/logie)\
**Post date:** [January 19, 2014, 12:34pm UTC](https://verificationacademy.com/forums/t/large-size-array-in-c-model/29083/2 "2014-01-19T12:34:04Z")

</div>

You are trying to allocate 36GB of memory in your “C” model. You are obviously exceeding the  
process limits on your machine.

Have you considered using an associative array (or a hash table) where you store index and value for each entry. These are very efficient data structures for sparse memory representations.
