Show
Ignore:
Timestamp:
06/04/06 13:05:48 (3 years ago)
Author:
brmorris
Message:

2006-06-04 Zalan <zalan.bujtas@nokia.com>

Reviewed by Sachin/Bradley


This commit introduces S60 3.1 support to S60WebKit's
JavaScriptCore, MemoryManager and S60Internals (part 1 of 3).

Location:
S60/trunk/MemoryManager
Files:
7 modified

Legend:

Unmodified
Added
Removed
  • S60/trunk/MemoryManager/Group/MemMan.mmp

    r14549 r14719  
    4040*/ 
    4141 
    42 #ifdef GCCE 
    43 TARGET          MemMan_gcce.dll 
    44 #elif defined( ARMCC ) 
     42#ifdef __GCCE__ 
    4543TARGET          MemMan_gcce.dll 
    4644#else 
  • S60/trunk/MemoryManager/Inc/Allocator.h

    r14549 r14719  
    1010*    All rights reserved. 
    1111 
    12      Redistribution and use in source and binary forms, with or without 
    13      modification, are permitted provided that the following conditions 
    14      are met: 
     12 Redistribution and use in source and binary forms, with or without 
     13 modification, are permitted provided that the following conditions 
     14 are met: 
    1515 
    1616*      * Redistributions of source code must retain the above copyright 
     
    2424*        from this software without specific prior written permission. 
    2525 
    26      THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
    27      "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
    28      LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
    29      A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
    30      OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    31      SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
    32      LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
    33      DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
    34      THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
    35      (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 
    36      USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 
    37      DAMAGE. 
     26 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
     27 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
     28 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
     29 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
     30 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
     31 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
     32 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
     33 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
     34 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
     35 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 
     36 USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 
     37 DAMAGE. 
    3838 
    3939*    Please see file patentlicense.txt for further grants. 
     
    7575*/ 
    7676class CAllocator 
    77         { 
    78         public: 
    79             virtual ~CAllocator(); 
    80              
    81                 /** 
    82             * create the allocator 
    83             * @since 3.1 
    84                 * @param aSize bytes of memory to be allocated 
    85             * @return pointer to the allocated memory 
    86             */ 
    87                 virtual TBool Create(); 
    88              
    89                 /** 
    90             * allocate a memory buffer 
    91             * @since 3.1 
    92                 * @param aSize bytes of memory to be allocated 
    93             * @return pointer to the allocated memory 
    94             */ 
    95                 virtual TAny* Allocate( TUint aSize ) = 0; 
    96                  
    97                 /** 
    98             * realloc a memory buffer 
    99             * @since 3.1 
    100                 * @param aSize bytes of memory to be allocated 
    101             * @return pointer to the allocated memory 
    102             */ 
    103           virtual TAny* ReAllocate( TAny* aPtr, TUint aSize ) = 0; 
    104  
    105                 /** 
    106             * free the memory 
    107             * @since 3.1 
    108                 * @param aPtr pointer to the memory to be freed 
    109                 * @param  
    110             * @return  
    111             */ 
    112                 virtual void Free( TAny* aPtr ) = 0; 
    113  
    114                 /** 
    115             * get the size of a memory buffer 
    116             * @since 3.1 
    117                 * @param aPtr pointer to the memory buffer 
    118                 * @param  
    119             * @return size of memory buffer 
    120             */ 
    121                 virtual TUint MemorySize( TAny* aPtr ) = 0; 
    122                                  
    123                 /** 
    124             * register a memory collector, memory manager doesn't own this collector 
    125             * @since 3.1 
    126                 * @param aCollector the collector to be registered 
    127                 * @param  
    128             * @return  
    129             */ 
    130                 void AddCollector( MMemoryCollector* aCollector ); 
    131  
    132                 /** 
    133             * unregister a memory collector 
    134             * @since 3.1 
    135                 * @param aCollector the collector to be unregistered 
    136                 * @param  
    137             * @return  
    138             */ 
    139                 void RemoveCollector( MMemoryCollector* aCollector ); 
    140                  
    141                 /** 
    142             * collect free memory from memory collectors 
    143             * @since 3.1 
    144                 * @param 
    145             * @return  
    146             */           
    147                 void CollectMemory(TUint aSize=-1); 
    148                  
    149                 /** 
    150             * restore the states of memory collectors 
    151             * @since 3.1 
    152                 * @param 
    153             * @return  
    154             */                           
    155                 void RestoreCollectors( TOOMPriority aPriority ); 
    156                  
    157                 /** 
    158             * register a stopper, memory manager doesn't own this stopper. 
    159             * @since 3.1 
    160                 * @param aStopper the stopper to be registered 
    161                 * @param  
    162             * @return  
    163             */ 
    164                 void AddStopper( MOOMStopper* aStopper ); 
    165  
    166                 /** 
    167             * unregister a stopper 
    168             * @since 3.1 
    169                 * @param aStopper the stopper to be unregistered 
    170                 * @param  
    171             * @return  
    172             */ 
    173                 void RemoveStopper( MOOMStopper* aStopper ); 
    174  
    175                 /** 
    176             * toggle the stopping status of memory manager 
    177             * @since 3.1 
    178                 * @param aStopping  
    179                 * @param  
    180             * @return  
    181             */ 
    182                 void SetStopping( TBool aStopping ); 
    183                  
    184                 /** 
    185             * get the array of stoppers, used by stopscheduler 
    186             * @since 3.1 
    187                 * @param  
    188                 * @param  
    189             * @return an array of stoppers  
    190             */           
    191                 RPointerArray<MOOMStopper>& Stoppers()                          { return iStoppers; } 
    192          
    193                 /** 
    194             * set the OOM notifier, memory manager doesn't own this notifier 
    195             * @since 3.1 
    196                 * @param aNotifier the notifier 
    197                 * @param  
    198             * @return  
    199             */ 
    200                 void SetNotifier( MOOMNotifier* aNotifier ); 
    201                  
    202                 /** 
    203                 * check if the memory manager is able to reserve enough memory for the coming operation. 
    204             * @since 3.1 
    205                 * @param aTotalSize total amount of memory 
    206                 * @param aMaxBufSizse the biggest contiguous memory buffer 
    207                 * @param aChecker the name of operation 
    208             * @return result of prechecking, ETrue = successful 
    209             */ 
    210                 TBool PreCheck( TUint aTotalSize, TUint aMaxBufSize, const TDesC8& aChecker ); 
    211                  
    212                 /** 
    213             * An additional check after an operation is completed.  
    214             * @since 3.1 
    215                 * @param  
    216                 * @param 
    217             * @return the status of memory during this operation. 
    218             */ 
    219                 TUint PostCheck(); 
    220                          
    221                 /** 
    222             * Trigger an OOM event, this function is only for debugging purpose 
    223             * @since 3.1 
    224                 * @param aType defines where memory allocation fails 
    225                 * @param 
    226             * @return 
    227             */ 
    228                 void TriggerOOM( TOOMType aType ); 
    229                                          
    230                 /** 
    231             * get status of memory manager 
    232             * @since 3.1 
    233                 * @param  
    234                 * @param 
    235             * @return the status 
    236             */ 
    237                 TUint Status()                                                                          { return iMemStatus; } 
    238                  
    239                 void SetStatus( TOOMCheckResult aStatus ); 
     77  { 
     78  public: 
     79      virtual ~CAllocator(); 
     80       
     81    /** 
     82      * create the allocator 
     83      * @since 3.1 
     84    * @param aSize bytes of memory to be allocated 
     85      * @return pointer to the allocated memory 
     86      */ 
     87    virtual TBool Create(); 
     88       
     89    /** 
     90      * allocate a memory buffer 
     91      * @since 3.1 
     92    * @param aSize bytes of memory to be allocated 
     93      * @return pointer to the allocated memory 
     94      */ 
     95    virtual TAny* Allocate( TUint aSize ) = 0; 
     96     
     97    /** 
     98      * realloc a memory buffer 
     99      * @since 3.1 
     100    * @param aSize bytes of memory to be allocated 
     101      * @return pointer to the allocated memory 
     102      */ 
     103    virtual TAny* ReAllocate( TAny* aPtr, TUint aSize ) = 0; 
     104 
     105    /** 
     106      * free the memory 
     107      * @since 3.1 
     108    * @param aPtr pointer to the memory to be freed 
     109    * @param  
     110      * @return  
     111      */ 
     112    virtual void Free( TAny* aPtr ) = 0; 
     113 
     114    /** 
     115      * get the size of a memory buffer 
     116      * @since 3.1 
     117    * @param aPtr pointer to the memory buffer 
     118    * @param  
     119      * @return size of memory buffer 
     120      */ 
     121    virtual TUint MemorySize( TAny* aPtr ) = 0; 
     122         
     123    /** 
     124      * register a memory collector, memory manager doesn't own this collector 
     125      * @since 3.1 
     126    * @param aCollector the collector to be registered 
     127    * @param  
     128      * @return  
     129      */ 
     130    void AddCollector( MMemoryCollector* aCollector ); 
     131 
     132    /** 
     133      * unregister a memory collector 
     134      * @since 3.1 
     135    * @param aCollector the collector to be unregistered 
     136    * @param  
     137      * @return  
     138      */ 
     139    void RemoveCollector( MMemoryCollector* aCollector ); 
     140     
     141    /** 
     142      * collect free memory from memory collectors 
     143      * @since 3.1 
     144    * @param 
     145      * @return  
     146      */     
     147    void CollectMemory(TUint aSize=-1); 
     148     
     149    /** 
     150      * restore the states of memory collectors 
     151      * @since 3.1 
     152    * @param 
     153      * @return  
     154      */         
     155    void RestoreCollectors( TOOMPriority aPriority ); 
     156     
     157    /** 
     158      * register a stopper, memory manager doesn't own this stopper. 
     159      * @since 3.1 
     160    * @param aStopper the stopper to be registered 
     161    * @param  
     162      * @return  
     163      */ 
     164    void AddStopper( MOOMStopper* aStopper ); 
     165 
     166    /** 
     167      * unregister a stopper 
     168      * @since 3.1 
     169    * @param aStopper the stopper to be unregistered 
     170    * @param  
     171      * @return  
     172      */ 
     173    void RemoveStopper( MOOMStopper* aStopper ); 
     174 
     175    /** 
     176      * toggle the stopping status of memory manager 
     177      * @since 3.1 
     178    * @param aStopping  
     179    * @param  
     180      * @return  
     181      */ 
     182    void SetStopping( TBool aStopping ); 
     183     
     184    /** 
     185      * get the array of stoppers, used by stopscheduler 
     186      * @since 3.1 
     187    * @param  
     188    * @param  
     189      * @return an array of stoppers  
     190      */     
     191    RPointerArray<MOOMStopper>& Stoppers()        { return iStoppers; } 
     192   
     193    /** 
     194      * set the OOM notifier, memory manager doesn't own this notifier 
     195      * @since 3.1 
     196    * @param aNotifier the notifier 
     197    * @param  
     198      * @return  
     199      */ 
     200    void SetNotifier( MOOMNotifier* aNotifier ); 
     201     
     202    /** 
     203    * check if the memory manager is able to reserve enough memory for the coming operation. 
     204      * @since 3.1 
     205    * @param aTotalSize total amount of memory 
     206    * @param aMaxBufSizse the biggest contiguous memory buffer 
     207    * @param aChecker the name of operation 
     208      * @return result of prechecking, ETrue = successful 
     209      */ 
     210    TBool PreCheck( TUint aTotalSize, TUint aMaxBufSize, const TDesC8& aChecker ); 
     211     
     212    /** 
     213      * An additional check after an operation is completed.  
     214      * @since 3.1 
     215    * @param  
     216    * @param 
     217      * @return the status of memory during this operation. 
     218      */ 
     219    TUint PostCheck(); 
     220       
     221    /** 
     222      * Trigger an OOM event, this function is only for debugging purpose 
     223      * @since 3.1 
     224    * @param aType defines where memory allocation fails 
     225    * @param 
     226      * @return 
     227      */ 
     228    void TriggerOOM( TOOMType aType ); 
     229           
     230    /** 
     231      * get status of memory manager 
     232      * @since 3.1 
     233    * @param  
     234    * @param 
     235      * @return the status 
     236      */ 
     237    TUint Status()                    { return iMemStatus; } 
     238     
     239    void SetStatus( TOOMCheckResult aStatus ); 
    240240 
    241241        /** 
     
    245245        * @return  
    246246        */    
    247                 TAny* AllocFromHeap( TUint sz );                 
    248                  
    249                 TUint DebugOOM()                                                                        { return iOOMType; } 
     247    TAny* AllocFromHeap( TUint sz );     
     248     
     249    TUint DebugOOM()                  { return iOOMType; } 
     250 
    250251        TUint FreeMemory( TFreeMem& aFree ); 
    251                  
    252                  
    253         protected: 
    254                 CAllocator() : iNotifier( 0 )           {} 
    255          
    256                 /** 
    257             * utility function, notify the user and stop ongoing operations 
    258             * @since 3.1 
    259             * @return  
    260             */ 
    261                 void NotifyAndStop(); 
    262          
    263                 /** 
    264             * allocate a buffer 
    265             * @since 3.1 
    266                 * @param aPtr the buffer to be allocated 
    267                 * @param 
    268             * @return ETrue successfully freed 
    269             */ 
    270                 TAny* DoAlloc( TUint aSize ); 
    271                  
    272                 MOOMNotifier*                           iNotifier;  // NOTE: not owned unless it is simple notifier, need to change when 
    273                                                                                                 // UI spec includes OOM notifier 
    274                  
    275                 TInt                                            iNestedChecks; 
    276                  
    277                 TBool                                           iIsStopping; 
    278                 RPointerArray<MOOMStopper>      iStoppers; 
    279                 CStopScheduler*                         iStopScheduler; 
    280                  
    281                 TBool                                                   iIsCollecting; 
    282                 RPointerArray<MMemoryCollector> iCollectors; 
     252     
     253     
     254  protected: 
     255    CAllocator() : iNotifier( 0 )   {} 
     256   
     257    /** 
     258      * utility function, notify the user and stop ongoing operations 
     259      * @since 3.1 
     260      * @return  
     261      */ 
     262    void NotifyAndStop(); 
     263   
     264    /** 
     265      * allocate a buffer 
     266      * @since 3.1 
     267    * @param aPtr the buffer to be allocated 
     268    * @param 
     269      * @return ETrue successfully freed 
     270      */ 
     271    TAny* DoAlloc( TUint aSize ); 
     272     
     273    MOOMNotifier*         iNotifier;  // NOTE: not owned unless it is simple notifier, need to change when 
     274                        // UI spec includes OOM notifier 
     275     
     276    TInt            iNestedChecks; 
     277     
     278    TBool           iIsStopping; 
     279    RPointerArray<MOOMStopper>  iStoppers; 
     280    CStopScheduler*       iStopScheduler; 
     281     
     282    TBool             iIsCollecting; 
     283    RPointerArray<MMemoryCollector> iCollectors; 
    283284         
    284285        // collecing rescue buffer 
    285                  
    286                 TUint                                           iMemStatus; 
    287                  
    288                 // for debugging 
    289                 TUint                                           iOOMType; 
    290                  
     286     
     287    TUint           iMemStatus; 
     288     
     289    // for debugging 
     290    TUint           iOOMType; 
     291     
    291292#ifdef _UNITTEST_ 
    292293                //for Unit Test 
     
    294295                friend class MemManUnitMemoryManager; 
    295296#endif 
    296         }; 
     297  }; 
    297298 
    298299/** 
     
    302303*/ 
    303304class CPlainAllocator : public CAllocator 
    304         { 
    305         public: 
    306                 TAny* Allocate( TUint aSize )           { return AllocFromHeap( aSize ); } 
    307                 TAny* ReAllocate( TAny* aPtr, TUint aSize ); 
    308                 void Free( TAny* aPtr ); 
    309                 TUint MemorySize( TAny* aPtr ); 
    310         }; 
     305  { 
     306  public: 
     307    TAny* Allocate( TUint aSize )   { return AllocFromHeap( aSize ); } 
     308    TAny* ReAllocate( TAny* aPtr, TUint aSize ); 
     309    void Free( TAny* aPtr ); 
     310    TUint MemorySize( TAny* aPtr ); 
     311  }; 
    311312 
    312313/** 
     
    318319 
    319320class CSimpleNotifier : public MOOMNotifier, public CBase 
    320         { 
    321         public: 
    322                 TInt Notify(); 
    323                  
    324                 CSimpleNotifier(); 
    325                 ~CSimpleNotifier(); 
    326  
    327         private: 
    328                 CAknInfoPopupNoteController* iInfoNote; 
    329         }; 
     321  { 
     322  public: 
     323    TInt Notify(); 
     324     
     325    CSimpleNotifier(); 
     326    ~CSimpleNotifier(); 
     327 
     328  private: 
     329    CAknInfoPopupNoteController* iInfoNote; 
     330  }; 
    330331#endif 
  • S60/trunk/MemoryManager/Inc/fast_malloc.h

    r14549 r14719  
    99*    All rights reserved. 
    1010 
    11      Redistribution and use in source and binary forms, with or without 
    12      modification, are permitted provided that the following conditions 
    13      are met: 
     11 Redistribution and use in source and binary forms, with or without 
     12 modification, are permitted provided that the following conditions 
     13 are met: 
    1414 
    1515*      * Redistributions of source code must retain the above copyright 
     
    2323*        from this software without specific prior written permission. 
    2424 
    25      THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
    26      "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
    27      LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
    28      A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
    29      OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    30      SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
    31      LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
    32      DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
    33      THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
    34      (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 
    35      USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 
    36      DAMAGE. 
     25 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
     26 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
     27 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
     28 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
     29 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
     30 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
     31 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
     32 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
     33 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
     34 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 
     35 USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 
     36 DAMAGE. 
    3737 
    3838*    Please see file patentlicense.txt for further grants. 
     
    4646// http://creativecommons.org/licenses/publicdomain.  Send questions, 
    4747// comments, complaints, performance data, etc to dl@cs.oswego.edu 
    48  
    49 #ifndef FAST_MALLOC 
    50 #define FAST_MALLOC 
     48#ifndef FAST_MALLOC_H 
     49#define FAST_MALLOC_H 
    5150 
    5251#include <stdlib.h> 
    5352 
    54 void *fast_malloc( size_t n ); 
    55 unsigned int fast_malloc_usable_size( void* p); 
    56  
    57 void fast_free( void* p ); 
     53void *fast_malloc(size_t n); 
     54void *fast_calloc(size_t n_elements, size_t element_size); 
     55void *fast_realloc(void* p, size_t n); 
     56void fast_free(void* p); 
    5857int  free_memory( size_t& pool, size_t& heap, size_t& sys ); 
    59  
    60 void *fast_calloc( size_t n_elements, size_t element_size ); 
    61 void *fast_realloc( void* p, size_t n ); 
    62  
     58bool owned_by_pool( void* p ); 
     59unsigned int fast_malloc_usable_size(void*); 
    6360bool fast_pre_check( size_t, size_t ); 
    6461void fast_post_check(); 
    65  
    66 bool owned_by_pool( void* p ); 
    6762void close_mem_pool(); 
    6863 
    69 #endif // FAST_MALLOC 
     64#endif /* FAST_MALLOC_H */ 
  • S60/trunk/MemoryManager/Inc/oom.h

    r14549 r14719  
    66*  Description :  
    77*  Version     : %Version% 
    8 * 
     8 * 
    99*    Copyright (c) 2006, Nokia Corporation 
    1010*    All rights reserved. 
    1111 
    12      Redistribution and use in source and binary forms, with or without 
    13      modification, are permitted provided that the following conditions 
    14      are met: 
     12 Redistribution and use in source and binary forms, with or without 
     13 modification, are permitted provided that the following conditions 
     14 are met: 
    1515 
    1616*      * Redistributions of source code must retain the above copyright 
     
    2424*        from this software without specific prior written permission. 
    2525 
    26      THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
    27      "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
    28      LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
    29      A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
    30      OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    31      SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
    32      LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
    33      DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
    34      THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
    35      (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 
    36      USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 
    37      DAMAGE. 
     26 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
     27 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTI