[umalloc] Formalise the user memory allocation API