Closed GoogleCodeExporter closed 9 years ago
} Maybe such option exists, but due to the lack of documentation I can't find
} it?
It is documented here, under "Modifying runtime behavior".
http://google-perftools.googlecode.com/svn/trunk/doc/tcmalloc.html
} TCMALLOC_SKIP_MMAP default: false If true, do not try to use mmap to
obtain
memory from the kernel.
If you set this to true, tcmalloc will use sbrk only. If you set it to false,
it
will use mmap if possible, and fall back to sbrk if mmap has a problem. There
is no
way to use mmap only (and have the malloc fail if the mmap fails?), but it
sounds
like these two behaviors are sufficient for what you have in mind.
craig
Original comment by csilv...@gmail.com
on 7 Jan 2009 at 6:42
Debugging a bit I found that on 32-bit machine 'mmap' is a fallback for 'sbrk'
and
not the other way around. This is because SbrkSysAllocator is added to
allocators
before MmapSysAllocator and therefore takes priority over mmap.
So there is actually no way to force to use only 'mmap' as of 1.0-rc2.
I still believe that it's nicer to add TCMALLOC_SKIP_SBRK with 0 as default to
leave
user fuller control.
Original comment by visa_des...@yahoo.com
on 7 Jan 2009 at 11:55
Original comment by csilv...@gmail.com
on 8 Jan 2009 at 12:13
} I still believe that it's nicer to add TCMALLOC_SKIP_SBRK with 0 as default
to leave
} user fuller control.
That makes sense to me. We'll have this flag (environment var) in the next
release.
Original comment by csilv...@gmail.com
on 9 Jan 2009 at 10:09
This was added in perftools 1.1, just released. I'm closing the bug, but feel
free
to reopen if it does not address your needs.
Original comment by csilv...@gmail.com
on 11 Mar 2009 at 9:16
Original issue reported on code.google.com by
visa_des...@yahoo.com
on 7 Jan 2009 at 10:00