Is malloc deterministic? Say If I have a forked process, that is, a replica of another process, and at some point both of them call the malloc
The C99 spec (at least, in its final public draft) states in 'J.1 Unspecified behavior':
The following are unspecified: ... The order and contiguity of storage allocated by successive calls to the calloc, malloc, and realloc functions (7.20.3).
So it would seem that malloc doesn't have to be deterministic. It therefore isn't safe to assume that it is.