Index: src/top.cc |
=================================================================== |
--- src/top.cc (revision 280) |
+++ src/top.cc (working copy) |
@@ -124,11 +124,11 @@ |
// When the thread starts running it will allocate a fixed number of bytes |
// on the stack and publish the location of this memory for others to use. |
void Run() { |
- char local_buffer[16 * 1024]; |
+ EmbeddedVector<char, 16 * 1024> local_buffer; |
// Initialize the buffer with a known good value. |
- strncpy(local_buffer, "Trace data was not generated.\n", |
- sizeof(local_buffer)); |
+ OS::StrNCpy(local_buffer, "Trace data was not generated.\n", |
+ local_buffer.length()); |
// Publish the local buffer and signal its availability. |
data_ = &local_buffer[0]; |
@@ -142,8 +142,8 @@ |
// Make sure we access the buffer after the wait to remove all possibility |
// of it being optimized away. |
- strncpy(local_buffer, "PreallocatedMemoryThread shutting down.\n", |
- sizeof(local_buffer)); |
+ OS::StrNCpy(local_buffer, "PreallocatedMemoryThread shutting down.\n", |
+ local_buffer.length()); |
} |
static char* data() { |