On 11/11/19 13:31, Andrew Jones wrote: >> I had some more time to think about and test this and I think returning >> NULL here is more useful. My usecase is a limit test where I allocate >> until I get a NULL and then free everything afterwards. > I think I prefer the assert here, since most users of this will not be > expecting to run out of memory, and therefore not checking for it. Yeah, the main issue with returning NULL is that (void*) 0 is a valid address for kvm-unit-tests. Paolo