| Index: runtime/vm/zone.cc
|
| ===================================================================
|
| --- runtime/vm/zone.cc (revision 10253)
|
| +++ runtime/vm/zone.cc (working copy)
|
| @@ -186,24 +186,12 @@
|
|
|
| char* BaseZone::MakeCopyOfString(const char* str) {
|
| intptr_t len = strlen(str) + 1; // '\0'-terminated.
|
| - char* copy = reinterpret_cast<char*>(Allocate(len));
|
| + char* copy = Alloc<char>(len);
|
| strncpy(copy, str, len);
|
| return copy;
|
| }
|
|
|
|
|
| -uword BaseZone::Reallocate(uword data, intptr_t old_size, intptr_t new_size) {
|
| - ASSERT(new_size >= 0);
|
| - uword new_data = Allocate(new_size);
|
| - if (data != 0) {
|
| - memmove(reinterpret_cast<void*>(new_data),
|
| - reinterpret_cast<void*>(data),
|
| - Utils::Minimum(old_size, new_size));
|
| - }
|
| - return new_data;
|
| -}
|
| -
|
| -
|
| #if defined(DEBUG)
|
| void BaseZone::DumpZoneSizes() {
|
| intptr_t size = 0;
|
| @@ -250,7 +238,7 @@
|
| intptr_t len = OS::VSNPrint(NULL, 0, format, args);
|
| va_end(args);
|
|
|
| - char* buffer = reinterpret_cast<char*>(Allocate(len + 1));
|
| + char* buffer = Alloc<char>(len + 1);
|
| va_list args2;
|
| va_start(args2, format);
|
| OS::VSNPrint(buffer, (len + 1), format, args2);
|
|
|