Please take a look at this article
https://blog.learngoprogramming.com/a-visual-guide-to-golang-memory-allocator-from-ground-up-e132258453ed
TOP will show you all virtual memory which kernel reserved for
application, not a memory used by application.
On 27.02.2019 10:20, Lee Rick wrote:
在 2019年2月27日星期三 UTC+8下午5:18:34,Lee Rick写道:
go1.12
i have 89936 records in mongodb, when i write a go program to load
data and profile it, i find it wrong
the size of 89936 records is about 85MB, go profile it use 100MB,
and use linux command top, the res is about 300MB
go program shoud use 100MB memory, but it use 300MB
my go code in attachment
anyone can tell me how reduce memory to 100MB
1.jpg
2.jpg
3.jpg
--
You received this message because you are subscribed to the Google
Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to golang-nuts+unsubscr...@googlegroups.com
<mailto:golang-nuts+unsubscr...@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.
--
-------------------------------
The information in this email is
confidential and may be legally privileged, it may contain information that
is confidential in CodiLime Sp. z o. o. It is intended solely for the
addressee. Any access to this email by third parties is unauthorized. If
you are not the intended recipient of this message, any disclosure,
copying, distribution or any action undertaken or neglected in reliance
thereon is prohibited and may result in your liability for damages.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.