[PATCH] D41649: [scudo] Touch memory to count as RSS

Jonas Hahnfeld via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 1 01:58:24 PST 2018


Hahnfeld added a comment.

In https://reviews.llvm.org/D41649#965470, @cryptoad wrote:

> How about using calloc instead and benefiting of the "included" zero'd memory feature? That would avoid implementing the touch function.
>  I won't be able to test anything before Jan. 2nd.


`calloc` doesn't work because the kernel can use copy-on-write zero pages, see https://willnewton.name/uncategorized/calloc-versus-malloc-and-memset/ for a full explanation. I can use the mentioned `memset` though and get rid of the `touch` function :-)


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D41649





More information about the llvm-commits mailing list