Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2902)

Unified Diff: base/allocator/winheap_stubs_win.cc

Issue 2331973002: Fix SyzyASAN build, by removing base/bits.h include. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/allocator/winheap_stubs_win.cc
diff --git a/base/allocator/winheap_stubs_win.cc b/base/allocator/winheap_stubs_win.cc
index 42f40dc8ad4cd48aa9ceb75d8a46b98981300fab..196e61f841cfb707f307efec4eb70cf989ff03a7 100644
--- a/base/allocator/winheap_stubs_win.cc
+++ b/base/allocator/winheap_stubs_win.cc
@@ -13,8 +13,6 @@
#include <new.h>
#include <windows.h>
-#include "base/bits.h"
-
namespace base {
namespace allocator {
@@ -29,6 +27,10 @@ inline HANDLE get_heap_handle() {
return reinterpret_cast<HANDLE>(_get_heap_handle());
}
+size_t Align(size_t size, size_t alignment) {
Primiano Tucci (use gerrit) 2016/09/12 15:44:22 At this point probably not worth having a separate
Sigurður Ásgeirsson 2016/09/12 17:15:22 Done.
+ return (size + alignment - 1) & ~(alignment - 1);
+}
+
} // namespace
void* WinHeapMalloc(size_t size) {
@@ -71,7 +73,7 @@ size_t WinHeapGetSizeEstimate(void* ptr) {
const size_t kAllocationGranularity = 8;
#endif
- return base::bits::Align(size, kAllocationGranularity);
+ return Align(size, kAllocationGranularity);
}
// Call the new handler, if one has been set.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698