Skip to content

Commit

Permalink
malloc-aggregation.d: don't forget posix_memalign (apple#785)
Browse files Browse the repository at this point in the history
Motivation:

When counting the number of allocations it's important not to forget an
allocation function that Swift uses.

Modifications:

add posix_memalign to dev/malloc-aggregation.d

Result:

malloc aggregations accurate with recent Swift versions
  • Loading branch information
weissi authored and Lukasa committed Jan 29, 2019
1 parent 58a58b9 commit 9480c27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dev/malloc-aggregation.d
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
printf("=====\n");
}

pid$target::malloc:entry, pid$target::posix_memalign:entry, pid$target::realloc:entry, pid$target::reallocf:entry, pid$target::calloc:entry, pid$target::valloc:entry {
pid$target::malloc:entry, pid$target::posix_memalign:entry, pid$target::realloc:entry, pid$target::reallocf:entry, pid$target::calloc:entry, pid$target::valloc:entry, pid$target::posix_memalign:entry {
@malloc_calls[ustack()] = count();
}

Expand Down

0 comments on commit 9480c27

Please sign in to comment.