Changeset 25483 in webkit for trunk/JavaScriptCore/wtf/FastMalloc.cpp
- Timestamp:
- Sep 10, 2007, 5:16:51 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/wtf/FastMalloc.cpp
r25422 r25483 2615 2615 } 2616 2616 2617 2618 size_t FastMallocZone::size(malloc_zone_t* zone, const void* ptr) 2617 size_t FastMallocZone::size(malloc_zone_t*, const void*) 2619 2618 { 2620 if (!ptr || !pageheap) 2621 return 0; 2622 2623 const PageID p = reinterpret_cast<uintptr_t>(ptr) >> kPageShift; 2624 Span* span = pageheap->GetDescriptorEnsureSafe(p); 2625 if (!span) 2626 return 0; 2627 2628 if (span->sizeclass == 0) 2629 return span->length * kPageSize; 2630 2631 return ByteSizeForClass(span->sizeclass); 2632 } 2633 2634 void* FastMallocZone::zoneMalloc(malloc_zone_t* zone, size_t size) 2619 return 0; 2620 } 2621 2622 void* FastMallocZone::zoneMalloc(malloc_zone_t*, size_t) 2635 2623 { 2636 return fastMalloc(size);2637 } 2638 2639 void* FastMallocZone::zoneCalloc(malloc_zone_t*, size_t numItems, size_t size)2624 return 0; 2625 } 2626 2627 void* FastMallocZone::zoneCalloc(malloc_zone_t*, size_t, size_t) 2640 2628 { 2641 return fastCalloc(numItems, size);2642 } 2643 2644 void FastMallocZone::zoneFree(malloc_zone_t*, void* ptr)2629 return 0; 2630 } 2631 2632 void FastMallocZone::zoneFree(malloc_zone_t*, void*) 2645 2633 { 2646 return fastFree(ptr); 2647 } 2648 2649 void* FastMallocZone::zoneRealloc(malloc_zone_t*, void* ptr, size_t size) 2634 } 2635 2636 void* FastMallocZone::zoneRealloc(malloc_zone_t*, void*, size_t) 2650 2637 { 2651 return fastRealloc(ptr, size);2638 return 0; 2652 2639 } 2653 2640
Note:
See TracChangeset
for help on using the changeset viewer.