Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory size is too large in TizenRT #44

Closed
hs0225 opened this issue Oct 23, 2017 · 6 comments · Fixed by #46
Closed

Memory size is too large in TizenRT #44

hs0225 opened this issue Oct 23, 2017 · 6 comments · Fixed by #46

Comments

@hs0225
Copy link
Contributor

hs0225 commented Oct 23, 2017

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.

@yichoi
Copy link

yichoi commented Oct 23, 2017

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

@rtakacs
Copy link
Contributor

rtakacs commented Oct 23, 2017

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

@hs0225
Copy link
Contributor Author

hs0225 commented Oct 23, 2017

@rtakacs You can see the result here.

@zherczeg
Copy link
Member

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.

@zherczeg
Copy link
Member

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

@rtakacs
Copy link
Contributor

rtakacs commented Oct 24, 2017

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants