Skip to content
Snippets Groups Projects
Commit bd569f92 authored by David Major's avatar David Major
Browse files

Bug 943051 - Fix VirtualAlloc and VirtualFree flags for gBreakpadReservedVM. r=bsmedberg, a=lsblakk

--HG--
extra : rebase_source : 7c2845992575450d13830c92db8a1df33f651580
parent 71f9373b
No related branches found
No related tags found
No related merge requests found
......@@ -719,14 +719,18 @@ static void* gBreakpadReservedVM;
* Reserve some VM space. In the event that we crash because VM space is
* being leaked without leaking memory, freeing this space before taking
* the minidump will allow us to collect a minidump.
*
* This size is bigger than xul.dll plus some extra for MinidumpWriteDump
* allocations.
*/
static const SIZE_T kReserveSize = 0xc00000; // 12 MB
static const SIZE_T kReserveSize = 0x2400000; // 36 MB
static void
ReserveBreakpadVM()
{
if (!gBreakpadReservedVM) {
gBreakpadReservedVM = VirtualAlloc(nullptr, kReserveSize, MEM_RESERVE, 0);
gBreakpadReservedVM = VirtualAlloc(nullptr, kReserveSize, MEM_RESERVE,
PAGE_NOACCESS);
}
}
......@@ -734,7 +738,7 @@ static void
FreeBreakpadVM()
{
if (gBreakpadReservedVM) {
VirtualFree(gBreakpadReservedVM, kReserveSize, MEM_RELEASE);
VirtualFree(gBreakpadReservedVM, 0, MEM_RELEASE);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment