# Haxe cpp memory usage limit?

**URL:** <https://community.haxe.org/t/haxe-cpp-memory-usage-limit/783>\
**Category:** Haxe\
**Tags:** haxe-cpp\
**Created:** [June 14, 2018, 11:10pm UTC](https://community.haxe.org/t/haxe-cpp-memory-usage-limit/783 "2018-06-14T23:10:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zvir](https://community.haxe.org/user_avatar/community.haxe.org/zvir/32/464_2.png) [@Zvir](https://community.haxe.org/u/Zvir)\
**Post date:** [June 14, 2018, 11:10pm UTC](https://community.haxe.org/t/haxe-cpp-memory-usage-limit/783/1 "2018-06-14T23:10:12Z")

</div>

I have a lot of data to process… more then 2.8 GB

it’s seems there is some sort of limit, program crashes after reaching 2.8 GB of ram. i.m using hxcpp\_m64, doesn’t help.

just a simple example:

```haxe
var result = [];
		result.setSize(10000);
		
		for (i in 0...10000)
		{			
			result[i] = [];
			result[i].setSize(10000);
			
			for (j in 0...10000)
			{
				result[i][j] = [];
				result[i][j].setSize(4);
				result[i][j][0] = Std.int(Math.random() * 100000);
				result[i][j][1] = Std.int(Math.random() * 100000);
				result[i][j][2] = Std.int(Math.random() * 100000);
				result[i][j][3] = Std.int(Math.random() * 100000);
			}
		}

```

What i’m missing here?

---

<div class="post-metadata">

**Author:** ![dmitryhryppa](https://community.haxe.org/user_avatar/community.haxe.org/dmitryhryppa/32/1815_2.png) [@dmitryhryppa](https://community.haxe.org/u/dmitryhryppa)\
**Post date:** [June 15, 2018, 12:29am UTC](https://community.haxe.org/t/haxe-cpp-memory-usage-limit/783/2 "2018-06-15T00:29:59Z")

</div>

Hello,  
there is a define HXCPP\_GC\_BIG\_BLOCKS which allow working memory greater than 1 Gig.  
Try it and maybe it will help.

Also, check this page, maybe you’ll find something useful:

> <https://github.com/HaxeFoundation/hxcpp/blob/master/docs/build_xml/Defines.md>
