-
Notifications
You must be signed in to change notification settings - Fork 730
add bh_print_vm to dump memory consumption information #1734
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -977,6 +977,19 @@ os_socket_set_broadcast(bh_socket_t socket, bool is_enabled); | |
| int | ||
| os_socket_get_broadcast(bh_socket_t socket, bool *is_enabled); | ||
|
|
||
| /** | ||
| * Dump memory information of the current process | ||
| * It may have variant implementations in different platforms | ||
| * | ||
| * @param out the output buffer. It is for sure the return content | ||
| * is a c-string which ends up with '\0' | ||
| * @param size the size of the output buffer | ||
| * | ||
| * @return 0 if success, -1 otherwise | ||
| */ | ||
| int | ||
| os_dumps_proc_mem_info(char *out, unsigned int size); | ||
wenyongh marked this conversation as resolved.
Show resolved
Hide resolved
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [minor] could we use
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, I think we could probably make the API more verbose - having
This is just a suggestion - if returning an unstructured blob from this function is really what we want, that's fine, just wanted to raise the concern and make sure we're making a conscious decision.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am thinking that |
||
|
|
||
| #ifdef __cplusplus | ||
| } | ||
| #endif | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.