apparently printf can allocate memory. this means that OoM handling needs to handle that scenario specially. for example: - free a block of memory first, then call printf - use fputs perhaps? or can it call malloc? - use low level functions like write(2).