use const void* for ptr and mem assertions