Skip to content

Commit

Permalink
(Green) Tidy stack expand messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
higepon committed May 15, 2010
1 parent 48600ec commit 3eb2eee
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/VM.cpp
Expand Up @@ -906,9 +906,13 @@ void VM::setCurrentOutputPort(Object port)

void VM::expandStack(int plusSize)
{
fprintf(stderr, "Stack Expand stack=%p plusSize=%d\n", stack_, plusSize);

const int nextStackSize = stackSize_ + plusSize;
const int WARN_STACK_SIZE_IN_MB = 48;
if (nextStackSize * sizeof(intptr_t) > WARN_STACK_SIZE_IN_MB * 1024 * 1024) {
fprintf(stderr, "Waring: Stack is growing to %ld MB\n", nextStackSize * sizeof(intptr_t) / 1024 / 1024);
}

Object* nextStack = Object::makeObjectArray(nextStackSize);
if (NULL == nextStack) {
// todo
Expand Down

0 comments on commit 3eb2eee

Please sign in to comment.