Related code:
write(-1, \"test\", sizeof(\"test\")); void * p = malloc(1024); void * p2 = malloc(510); write(-1, \"hi\", sizeof(\"hi\"));
What do you think brk is? malloc absolutely is invoking a syscall in this example, the syscall just isn't "malloc".