| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 } | 43 } |
| 44 | 44 |
| 45 char* fastStrDup(const char* src) | 45 char* fastStrDup(const char* src) |
| 46 { | 46 { |
| 47 size_t len = strlen(src) + 1; | 47 size_t len = strlen(src) + 1; |
| 48 char* dup = static_cast<char*>(fastMalloc(len)); | 48 char* dup = static_cast<char*>(fastMalloc(len)); |
| 49 memcpy(dup, src, len); | 49 memcpy(dup, src, len); |
| 50 return dup; | 50 return dup; |
| 51 } | 51 } |
| 52 | 52 |
| 53 // TODO: remove these two. | |
| 54 void releaseFastMallocFreeMemory() { } | |
| 55 | |
| 56 FastMallocStatistics fastMallocStatistics() | 53 FastMallocStatistics fastMallocStatistics() |
| 57 { | 54 { |
| 58 FastMallocStatistics statistics = { 0, 0, 0 }; | 55 FastMallocStatistics statistics = { 0, 0, 0 }; |
| 59 return statistics; | 56 return statistics; |
| 60 } | 57 } |
| 61 | 58 |
| 62 } // namespace WTF | 59 } // namespace WTF |
| 63 | 60 |
| 64 #if USE(SYSTEM_MALLOC) | 61 #if USE(SYSTEM_MALLOC) |
| 65 | 62 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 } | 128 } |
| 132 | 129 |
| 133 void* fastRealloc(void* p, size_t n) | 130 void* fastRealloc(void* p, size_t n) |
| 134 { | 131 { |
| 135 return partitionReallocGeneric(gPartition.root(), p, n); | 132 return partitionReallocGeneric(gPartition.root(), p, n); |
| 136 } | 133 } |
| 137 | 134 |
| 138 } // namespace WTF | 135 } // namespace WTF |
| 139 | 136 |
| 140 #endif // USE(SYSTEM_MALLOC) | 137 #endif // USE(SYSTEM_MALLOC) |
| OLD | NEW |