Changeset 48623 in webkit for trunk/JavaScriptCore/interpreter


Ignore:
Timestamp:
Sep 22, 2009, 3:30:55 AM (16 years ago)
Author:
Simon Hausmann
Message:

Fix major memory leak in JavaScriptCore RegisterFile on Windows CE

Patch by Joerg Bornemann <[email protected]> on 2009-09-22
Reviewed by Simon Hausmann.

https://bugs.webkit.org/show_bug.cgi?id=29367

On Widows CE we must decommit all committed pages before we release
them. See VirtualFree documentation.
Desktop Windows behaves much smoother in this situation.

  • interpreter/RegisterFile.cpp:

(JSC::RegisterFile::~RegisterFile):

File:
1 edited

Legend:

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

    r47959 r48623  
    3737    munmap(m_buffer, ((m_max - m_start) + m_maxGlobals) * sizeof(Register));
    3838#elif HAVE(VIRTUALALLOC)
     39#if PLATFORM(WINCE)
     40    VirtualFree(m_buffer, DWORD(m_commitEnd) - DWORD(m_buffer), MEM_DECOMMIT);
     41#endif
    3942    VirtualFree(m_buffer, 0, MEM_RELEASE);
    4043#else
Note: See TracChangeset for help on using the changeset viewer.