bug 127092 heap dumps for accurate heap measurement on MOZ_HeapDump

message r=blythe, sr=brendan, a=shaver
This commit is contained in:
dp%netscape.com 2002-02-27 02:54:50 +00:00
Родитель e00f0abe6a
Коммит 7ee84187e9
1 изменённых файлов: 12 добавлений и 0 удалений

Просмотреть файл

@ -98,6 +98,10 @@
#include "nsTraceMalloc.h"
#endif
#if defined(DEBUG) && defined(XP_WIN32)
#include <malloc.h>
#endif
#include "nsITimelineService.h"
#if defined(DEBUG_sspitzer) || defined(DEBUG_seth) || defined(DEBUG_pra)
@ -1527,6 +1531,14 @@ int main(int argc, char* argv[])
{
NS_TIMELINE_MARK("enter main");
#if defined(DEBUG) && defined(XP_WIN32)
// Disable small heap allocator to get heapwalk() giving us
// accurate heap numbers. Win2k non-debug does not use small heap allocator.
// Win2k debug seems to be still using it.
// http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_crt__set_sbh_threshold.asp
_set_sbh_threshold(0);
#endif
#if defined(XP_UNIX) || defined(XP_BEOS)
InstallUnixSignalHandlers(argv[0]);
#endif