| OLD | NEW |
| 1 // Copyright (c) 2005, 2007, Google Inc. | 1 // Copyright (c) 2005, 2007, Google Inc. |
| 2 // All rights reserved. | 2 // All rights reserved. |
| 3 // Copyright (C) 2005, 2006, 2007, 2008, 2009, 2011 Apple Inc. All rights reserv
ed. | 3 // Copyright (C) 2005, 2006, 2007, 2008, 2009, 2011 Apple Inc. All rights reserv
ed. |
| 4 // | 4 // |
| 5 // Redistribution and use in source and binary forms, with or without | 5 // Redistribution and use in source and binary forms, with or without |
| 6 // modification, are permitted provided that the following conditions are | 6 // modification, are permitted provided that the following conditions are |
| 7 // met: | 7 // met: |
| 8 // | 8 // |
| 9 // * Redistributions of source code must retain the above copyright | 9 // * Redistributions of source code must retain the above copyright |
| 10 // notice, this list of conditions and the following disclaimer. | 10 // notice, this list of conditions and the following disclaimer. |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 char* fastStrDup(const char* src) | 46 char* fastStrDup(const char* src) |
| 47 { | 47 { |
| 48 size_t len = strlen(src) + 1; | 48 size_t len = strlen(src) + 1; |
| 49 char* dup = static_cast<char*>(fastMalloc(len)); | 49 char* dup = static_cast<char*>(fastMalloc(len)); |
| 50 memcpy(dup, src, len); | 50 memcpy(dup, src, len); |
| 51 return dup; | 51 return dup; |
| 52 } | 52 } |
| 53 | 53 |
| 54 void* fastMalloc(size_t n) | 54 void* fastMalloc(size_t n) |
| 55 { | 55 { |
| 56 return partitionAllocGeneric(Partitions::getFastMallocPartition(), n); | 56 return partitionAllocGeneric(Partitions::fastMallocPartition(), n); |
| 57 } | 57 } |
| 58 | 58 |
| 59 void fastFree(void* p) | 59 void fastFree(void* p) |
| 60 { | 60 { |
| 61 partitionFreeGeneric(Partitions::getFastMallocPartition(), p); | 61 partitionFreeGeneric(Partitions::fastMallocPartition(), p); |
| 62 } | 62 } |
| 63 | 63 |
| 64 void* fastRealloc(void* p, size_t n) | 64 void* fastRealloc(void* p, size_t n) |
| 65 { | 65 { |
| 66 return partitionReallocGeneric(Partitions::getFastMallocPartition(), p, n); | 66 return partitionReallocGeneric(Partitions::fastMallocPartition(), p, n); |
| 67 } | 67 } |
| 68 | 68 |
| 69 } // namespace WTF | 69 } // namespace WTF |
| OLD | NEW |