FAQ
Perhaps it will be simpler to allocate all mprof-related memory from Sys
regions, then they will be automatically not scanned. No need for any
special marking, etc.



https://codereview.appspot.com/7135063/diff/1/src/pkg/runtime/mprof.goc
File src/pkg/runtime/mprof.goc (right):

https://codereview.appspot.com/7135063/diff/1/src/pkg/runtime/mprof.goc#newcode518
src/pkg/runtime/mprof.goc:518: for(e=addrfree; e; e=e->next) {
all objects in addrfree list are allocated with single malloc() call, so
you must not mark them all

https://codereview.appspot.com/7135063/

Search Discussions

  • 0xe2 0x9a 0x9b at Jan 20, 2013 at 10:24 am
    https://codereview.appspot.com/7135063/diff/1/src/pkg/runtime/mprof.goc
    File src/pkg/runtime/mprof.goc (right):

    https://codereview.appspot.com/7135063/diff/1/src/pkg/runtime/mprof.goc#newcode518
    src/pkg/runtime/mprof.goc:518: for(e=addrfree; e; e=e->next) {
    On 2013/01/20 10:00:06, dvyukov wrote:
    all objects in addrfree list are allocated with single malloc() call, Not true.
    so you must not mark them all
    It is safe to call runtime·markobject() multiple times with arguments
    pointing to the same block of memory.

    https://codereview.appspot.com/7135063/
  • 0xe2 0x9a 0x9b at Jan 20, 2013 at 10:58 am

    On 2013/01/20 10:00:06, dvyukov wrote:
    Perhaps it will be simpler to allocate all mprof-related memory from Sys
    regions, then they will be automatically not scanned. No need for any special
    marking, etc.
    If we will agree upon that this does not constrain the future
    development (whatever it will be) of mprof.goc then I will reimplement
    this CL with calls to runtime·SysAlloc() and without any calls to
    mallocgc().

    https://codereview.appspot.com/7135063/
  • Dmitry Vyukov at Jan 21, 2013 at 6:13 am
    As far as I see google heap profiler frees memory only during
    stop/shutdown (here we can unmap all mapped memory at once) or for
    temp storage (e.g. snapshots, here we can use normal heap memory since
    it's transient):
    http://code.google.com/p/gperftools/source/browse/trunk/src/heap-profiler.cc?spec=svn169&r=169
    http://code.google.com/p/gperftools/source/browse/trunk/src/heap-profile-table.cc
    On Sun, Jan 20, 2013 at 2:58 PM, wrote:
    On 2013/01/20 10:00:06, dvyukov wrote:

    Perhaps it will be simpler to allocate all mprof-related memory from Sys
    regions, then they will be automatically not scanned. No need for any special
    marking, etc.

    If we will agree upon that this does not constrain the future
    development (whatever it will be) of mprof.goc then I will reimplement
    this CL with calls to runtime·SysAlloc() and without any calls to
    mallocgc().

    https://codereview.appspot.com/7135063/

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-dev @
categoriesgo
postedJan 20, '13 at 10:00a
activeJan 21, '13 at 6:13a
posts4
users2
websitegolang.org

2 users in discussion

Dmitry Vyukov: 2 posts 0xe2 0x9a 0x9b: 2 posts

People

Translate

site design / logo © 2022 Grokbase