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

Side by Side Diff: third_party/tcmalloc/chromium/src/malloc_hook-inl.h

Issue 7033062: Replaced ptrdiff_t with std::ptrdiff_t in all files to enable build with gcc-4.6.0. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2005, Google Inc. 1 // Copyright (c) 2005, Google Inc.
2 // All rights reserved. 2 // All rights reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // * Redistributions of source code must retain the above copyright 8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer. 9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above 10 // * Redistributions in binary form must reproduce the above
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 MallocHook::MremapHook hook = MallocHook::GetMremapHook(); 163 MallocHook::MremapHook hook = MallocHook::GetMremapHook();
164 if (hook != NULL) (*hook)(result, 164 if (hook != NULL) (*hook)(result,
165 old_addr, old_size, 165 old_addr, old_size,
166 new_size, flags, new_addr); 166 new_size, flags, new_addr);
167 } 167 }
168 168
169 inline MallocHook::PreSbrkHook MallocHook::GetPreSbrkHook() { 169 inline MallocHook::PreSbrkHook MallocHook::GetPreSbrkHook() {
170 return base::internal::presbrk_hook_.Get(); 170 return base::internal::presbrk_hook_.Get();
171 } 171 }
172 172
173 inline void MallocHook::InvokePreSbrkHook(ptrdiff_t increment) { 173 inline void MallocHook::InvokePreSbrkHook(std::ptrdiff_t increment) {
174 MallocHook::PreSbrkHook hook = MallocHook::GetPreSbrkHook(); 174 MallocHook::PreSbrkHook hook = MallocHook::GetPreSbrkHook();
175 if (hook != NULL && increment != 0) (*hook)(increment); 175 if (hook != NULL && increment != 0) (*hook)(increment);
176 } 176 }
177 177
178 inline MallocHook::SbrkHook MallocHook::GetSbrkHook() { 178 inline MallocHook::SbrkHook MallocHook::GetSbrkHook() {
179 return base::internal::sbrk_hook_.Get(); 179 return base::internal::sbrk_hook_.Get();
180 } 180 }
181 181
182 inline void MallocHook::InvokeSbrkHook(const void* result, 182 inline void MallocHook::InvokeSbrkHook(const void* result,
183 ptrdiff_t increment) { 183 std::ptrdiff_t increment) {
184 MallocHook::SbrkHook hook = MallocHook::GetSbrkHook(); 184 MallocHook::SbrkHook hook = MallocHook::GetSbrkHook();
185 if (hook != NULL && increment != 0) (*hook)(result, increment); 185 if (hook != NULL && increment != 0) (*hook)(result, increment);
186 } 186 }
187 187
188 #endif /* _MALLOC_HOOK_INL_H_ */ 188 #endif /* _MALLOC_HOOK_INL_H_ */
OLDNEW
« no previous file with comments | « third_party/tcmalloc/chromium/src/malloc_hook.cc ('k') | third_party/tcmalloc/chromium/src/memory_region_map.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698