Ignore:
Timestamp:
Jun 30, 2008, 4:21:43 AM (17 years ago)
Author:
[email protected]
Message:

Reviewed by Cameron Zwarich.

Make RegisterFile really unmap memory on destruction.

This fixes run-webkit-tests --threaded, which ran out of address space in a few seconds.

  • VM/RegisterFile.cpp: (KJS::RegisterFile::~RegisterFile): Unmap all the memory, not just 1/4 of it.
  • kjs/JSGlobalObject.h: Don't include RegisterFile.h, so that changes to it don't make half of WebCore rebuild.
  • VM/Machine.h: Don't forward declare RegisterFile, as RegisterFile.h is included already.
  • VM/RegisterFile.h: (KJS::RegisterFile::RegisterFile): Assert that the allocation succeeded.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/VM/RegisterFile.cpp

    r34838 r34886  
    3535{
    3636#if HAVE(MMAP)
    37     munmap(m_buffer, m_capacity + m_maxGlobals);
     37    munmap(m_buffer, (m_capacity + m_maxGlobals) * sizeof(Register));
    3838#elif HAVE(VIRTUALALLOC)
    3939    // FIXME: Use VirtualFree.
Note: See TracChangeset for help on using the changeset viewer.