Ignore:
Timestamp:
Nov 12, 2007, 12:00:29 AM (18 years ago)
Author:
oliver
Message:

Add special fastZeroedMalloc function to replace a
number of fastCalloc calls where one argument was 1.

Reviewed by Darin.

This results in a 0.4% progression in SunSpider, more
than making up for the earlier regression caused by
additional overflow checks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/array_instance.cpp

    r27448 r27711  
    7676    m_length = initialLength;
    7777    m_vectorLength = initialCapacity;
    78     m_storage = static_cast<ArrayStorage*>(fastCalloc(storageSize(initialCapacity), 1));
     78    m_storage = static_cast<ArrayStorage*>(fastZeroedMalloc(storageSize(initialCapacity)));
    7979
    8080    Collector::reportExtraMemoryCost(initialCapacity * sizeof(JSValue*));
Note: See TracChangeset for help on using the changeset viewer.