Merge "Match argument order in cpp file" am: a3d0bf05c3

Original change: https://android-review.googlesource.com/c/platform/bionic/+/2380128

Change-Id: I1f56e7cc5dff6a73016bd7eef048b997ae3e5aad
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Greg Kaiser 2023-01-09 23:46:35 +00:00 committed by Automerger Merge Worker
commit d07017f882
3 changed files with 3 additions and 3 deletions

View file

@ -109,7 +109,7 @@ class FreeEntry : public AllocEntry {
class CallocEntry : public MallocEntry {
public:
CallocEntry(void* pointer, size_t size, size_t nmemb, uint64_t st, uint64_t et);
CallocEntry(void* pointer, size_t nmemb, size_t size, uint64_t st, uint64_t et);
virtual ~CallocEntry() = default;
bool Write(int fd) const override;

View file

@ -943,7 +943,7 @@ void* debug_calloc(size_t nmemb, size_t bytes) {
if (g_debug->config().options() & RECORD_ALLOCS) {
g_debug->record->AddEntry(
new CallocEntry(pointer, bytes, nmemb, result.GetStartTimeNS(), result.GetEndTimeNS()));
new CallocEntry(pointer, nmemb, bytes, result.GetStartTimeNS(), result.GetEndTimeNS()));
}
if (pointer != nullptr && g_debug->TrackPointers()) {

View file

@ -2196,7 +2196,7 @@ void VerifyRecordAllocs(const std::string& record_filename) {
debug_free(pointer);
expected.push_back(android::base::StringPrintf("%d: free %p", getpid(), pointer));
pointer = debug_calloc(1, 20);
pointer = debug_calloc(20, 1);
ASSERT_TRUE(pointer != nullptr);
expected.push_back(android::base::StringPrintf("%d: calloc %p 20 1", getpid(), pointer));
debug_free(pointer);