GC heap size

GC heap size

Bild des Benutzers Hikaru Inoue

Hi,

I run the simple code with ARBB_VERBOSE=1 and i got the following output.
> ArBB GC: the heap is allocated, reserve size = 1073741824 bytes !
It is too large for my 32bit application.

Could you tell me how to change the size of GC heap? I tried ARBB_OPT_LEVEL, ARBB_INIT_HEAP and ARBB_MAX_HEAP, but it does not change.

6 Beiträge / 0 neu
Letzter Beitrag
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.
Bild des Benutzers Noah Clemons (Intel)

What sample is giving this issue? I will research GC heap, but what sample you are using could be useful to me.

Bild des Benutzers Hikaru Inoue

Here is the program:

#include
void my_function(arbb::f32& result, arbb::f32 a, arbb::f32 b)
{
result = a + b;
}
int main(void)
{
arbb::f32 x = 1.0f;
arbb::f32 y = 2.0f;
arbb::f32 z;
arbb::call(my_function)(z, x, y);
}

And the verbose output:

>> ArBB EMU: Emulation library initialization finished. Function table size: 49748>> ArBB GC: the heap is being created !
>> ArBB GC: the heap is allocated, reserve size = 1073741824 bytes !
>> ArBB GC: the heap is allocated, allocated size = 134217728 bytes !
>> ArBB HLO: Disabled Opt:dsfusion block metacheck wrtcheck accurate_fp invDemote fusemap aggressive_memopt dump_cpp recursive_call accessor scalarize_map
>> ArBB HLO: compilation time 61476 us
>> ArBB CCG: proc(eu_0), start compilation...
>> ArBB CCG: eu_0 compilation time 27226 us
>> ArBB LLO: LLO compilation time for EU: 60594 us
>> ArBB LLO: The static count of memory allocations in current EU is: 0
>> ArBB HLO: compilation time 316 us
>> ArBB CCG: proc(eu_1), start compilation...
>> ArBB CCG: eu_1 compilation time 825 us
>> ArBB LLO: LLO compilation time for EU: 9865 us
>> ArBB LLO: The static count of memory allocations in current EU is: 0
>> ArBB HLO: compilation time 349 us
>> ArBB CCG: proc(eu_2), start compilation...
>> ArBB CCG: eu_2 compilation time 560 us
>> ArBB LLO: LLO compilation time for EU: 116 us
>> ArBB LLO: The static count of memory allocations in current EU is: 0 0 us
>> ArBB GC: [GC count = 1, Freed Objs = 12, Freed Bytes = 3072 bytes, Live Objs = 0, Live Bytes = 0 bytes, GC Time = 86 us, GC Total Time = 86 us]
>> ArBB GC: GC leak memory = 0 byte
>> ArBB GC: the heap is released !

Bild des Benutzers Zhang Z (Intel)

Thanks for your test case. After some investigation, it turns out that the environment variables ARBB_INIT_HEAP and ARBB_MAX_HEAP are not interpreted correctly by the runtime. It is a bug and we will address it as soon as we can. Thank you for bringing this to our attention.

Bild des Benutzers Akihiro Yamasaki

Do you mean it will be able to shrink the initial reserved size? Which environment variable? Is there another ways to change it such as API or C++ preprocessor define?
Thanks, Akihiro Yamasaki

Bild des Benutzers Zhang Z (Intel)

Akihiro,

The initial reserved heap size (set by ARBB_INIT_HEAP) will not shrink. It can only grow up to the maximum heap size (set by ARBB_MAX_HEAP). Currently, these two environment variables do not work properly. Intel ArBB engineering team is aware of this and will resolve the issue in a near-future release.

We've heard many customers asking for API control for heap sizes. So we are on it! A new set of API will be available soon to phase out the need of environment variables. Details about the new API are not available at this time. But please stay tuned.

Thanks,
Zhang

Melden Sie sich an, um einen Kommentar zu hinterlassen.