fix StackSpace to use new stack location scheme.

This commit is contained in:
Kelvin Sherlock 2014-12-18 15:40:12 -05:00
parent 84fdeb116f
commit 4bf57c6ce4

View File

@ -747,17 +747,9 @@ namespace MM
SetMemError(0);
// find the pointer base...
// todo -- call lower bound, then iter-- ?
for (const auto & iter : PtrMap)
{
if (sp >= iter.first && sp < iter.first + iter.second)
{
return sp - iter.first;
}
}
// MemorySize is the top of the heap. stack is after it.
return 0;
return sp - MemorySize;
}