I guess both Java and OCaml will see that the object can be generated on the stack which makes it much faster.
By using malloc in the C implementation, you force it to be on the heap.
By using malloc in the C implementation, you force it to be on the heap.
Because if it really would use something like malloc, I don't really see how it should be faster than the C version.