~mrms/umprof

247ce6838362b0bd874e55814e7ca96bec8e9a35 — Marek Maškarinec 6 months ago f222a04
add umprofDeinit
1 files changed, 10 insertions(+), 0 deletions(-)

M umprof.h
M umprof.h => umprof.h +10 -0
@@ 53,6 53,12 @@ int umprofGetInfo(UmprofInfo *output, int maxInfo);
// Prints a table made from arr into the file f.
void umprofPrintInfo(FILE *f, UmprofInfo *arr, int arrlen);

// Exports the events in google JSON profiling format.
void umprofPrintEventsJSON(FILE *f);

// Free memory allocated by umprof
void umprofDeinit(void);

#ifdef UMPROF_IMPL

UmprofEvent *umprofEvents = NULL;


@@ 188,5 194,9 @@ void umprofPrintEventsJSON(FILE *f) {
	fprintf(f, "]\n");
}

void umprofDeinit(void) {
	free(umprofEvents);
}

#endif // UMPROF_IMPL
#endif // !UMPROF_H