pa2.2: add memory tracer

This commit is contained in:
xinyangli 2024-03-13 18:14:17 +08:00
parent c917083554
commit 0f7c6fd508
No known key found for this signature in database
3 changed files with 66 additions and 3 deletions

View file

@ -20,6 +20,9 @@
#include <stdio.h>
#include <utils.h>
#define Trace(format, ...) \
_Log("[TRACE] " format "\n", ## __VA_ARGS__)
#define Log(format, ...) \
_Log(ANSI_FMT("[INFO] %s:%d %s() ", ANSI_FG_BLUE) format "\n", \
__FILE__, __LINE__, __func__, ## __VA_ARGS__)