OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
678 } | 678 } |
679 | 679 |
680 | 680 |
681 void OS::StrNCpy(Vector<char> dest, const char* src, size_t n) { | 681 void OS::StrNCpy(Vector<char> dest, const char* src, size_t n) { |
682 int result = strncpy_s(dest.start(), dest.length(), src, n); | 682 int result = strncpy_s(dest.start(), dest.length(), src, n); |
683 USE(result); | 683 USE(result); |
684 ASSERT(result == 0); | 684 ASSERT(result == 0); |
685 } | 685 } |
686 | 686 |
687 | 687 |
688 void OS::WcsCpy(Vector<wchar_t> dest, const wchar_t* src) { | |
689 int result = wcscpy_s(dest.start(), dest.length(), src); | |
690 USE(result); | |
691 ASSERT(result == 0); | |
692 } | |
693 | |
694 | |
695 char *OS::StrDup(const char* str) { | 688 char *OS::StrDup(const char* str) { |
696 return _strdup(str); | 689 return _strdup(str); |
697 } | 690 } |
698 | 691 |
699 | 692 |
700 // We keep the lowest and highest addresses mapped as a quick way of | 693 // We keep the lowest and highest addresses mapped as a quick way of |
701 // determining that pointers are outside the heap (used mostly in assertions | 694 // determining that pointers are outside the heap (used mostly in assertions |
702 // and verification). The estimate is conservative, ie, not all addresses in | 695 // and verification). The estimate is conservative, ie, not all addresses in |
703 // 'allocated' space are actually allocated to our heap. The range is | 696 // 'allocated' space are actually allocated to our heap. The range is |
704 // [lowest, highest), inclusive on the low and and exclusive on the high end. | 697 // [lowest, highest), inclusive on the low and and exclusive on the high end. |
(...skipping 870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1575 | 1568 |
1576 // Release the thread handles | 1569 // Release the thread handles |
1577 CloseHandle(data_->sampler_thread_); | 1570 CloseHandle(data_->sampler_thread_); |
1578 CloseHandle(data_->profiled_thread_); | 1571 CloseHandle(data_->profiled_thread_); |
1579 } | 1572 } |
1580 | 1573 |
1581 | 1574 |
1582 #endif // ENABLE_LOGGING_AND_PROFILING | 1575 #endif // ENABLE_LOGGING_AND_PROFILING |
1583 | 1576 |
1584 } } // namespace v8::internal | 1577 } } // namespace v8::internal |
OLD | NEW |