It returns zero on success; do not test for -1 or use errno as its result. glibc 2.40 tries native allocation first and uses emulation after EOPNOTSUPP. Its read/write fallback can race concurrent modifications; this is not a universal property of native allocation or every C library.