Index: src/allocation.cc |
diff --git a/src/allocation.cc b/src/allocation.cc |
index 6c7a08cec8008b3f0675e25d7c422beb5ca20c15..94aaad3fd42e8aac7a99d19658b45bb95adbe0f0 100644 |
--- a/src/allocation.cc |
+++ b/src/allocation.cc |
@@ -28,8 +28,8 @@ |
#include "allocation.h" |
#include <stdlib.h> // For free, malloc. |
-#include <string.h> // For memcpy. |
#include "checks.h" |
+#include "platform.h" |
#include "utils.h" |
namespace v8 { |
@@ -85,7 +85,7 @@ void AllStatic::operator delete(void* p) { |
char* StrDup(const char* str) { |
int length = StrLength(str); |
char* result = NewArray<char>(length + 1); |
- memcpy(result, str, length); |
+ OS::MemCopy(result, str, length); |
result[length] = '\0'; |
return result; |
} |
@@ -95,7 +95,7 @@ char* StrNDup(const char* str, int n) { |
int length = StrLength(str); |
if (n < length) length = n; |
char* result = NewArray<char>(length + 1); |
- memcpy(result, str, length); |
+ OS::MemCopy(result, str, length); |
result[length] = '\0'; |
return result; |
} |