Target applications will now be able to mark any region of memory as defined by simply invoking the macro MEMCLIENT_MARK_MEM_DEFINED_IF_ADDRESSABLE(). To implement the corresponding functionality in memclient, the client developer creates a handler function having the same signature as the annotation function and registers it for the annotation using dr_annotation_register_call(). For example:
After registering the handler, all instances of the new annotation will be transformed into a clean call to handle_mark_mem_defined_if_addressable(), where the arguments to the annotation macro become arguments to the clean call.