jerryscript-project / js-remote-test

This repository is includes the automatic test results of iotjs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Memory size is too large in TizenRT

hs0225 opened this issue · comments

Look at the memory size of test_buffer.js,

Board Memory Size
STM32 32840 Byte
RP2 33159 Byte
Artik053 4253768376 Byte

The memory size is abnormally large only in Artik053. We should measure it correctly.

I would like to have proper measurement tool for memory usage dynamically

@hs0225: Could you please print the value of the stdout variable here?

@rtakacs You can see the result here.

It seems only the allocated and peak allocated values are wrong. The rest of the allocations are 0 (I suppose this is printed at the end after everything is freed), and peak values are reasonable.

As far as I remember we use a hack to inject external allocation data into JerryScript memstats. Perhaps the injected data is wrong, and that is what @LaszloLango is talking about. Furthermore it seems to me that the injected numbers are kind of random, because there are big, but not too big numbers (e.g. 2813060968) are there.

@hs0225 does Tizen uses the allocator of nuttix or something else? Is it configured to use 4 or 2 byte sizes?

@zherczeg As I checked, TizenRT uses the same allocator than NuttX, but it extends the allocnode structure with other debug heap information. That is why the size is 16 bytes. #46 is a fix for this issue.