add instrumentation to diagnose failed VM commit

This was SVN commit r10405.
This commit is contained in:
janwas
2011-10-15 22:03:42 +00:00
parent 3624f7c417
commit 6c102ea712
3 changed files with 14 additions and 0 deletions
+4
View File
@@ -109,7 +109,11 @@ Status da_set_size(DynArray* da, size_t new_size)
bool ok = true;
// expanding
if(size_delta_pa > 0)
{
ok = vm::Commit(uintptr_t(end), size_delta_pa);
if(!ok)
debug_printf(L"Commit failed (%p %d)\n", end, size_delta_pa);
}
// shrinking
else if(size_delta_pa < 0)
ok = vm::Decommit(uintptr_t(end+size_delta_pa), -size_delta_pa);