Yao Zhang - 2001-11-02

Logged In: YES
user_id=296951

Another one which I find is running the code:

#include <stdio.h>
#include <time.h>

int main(int argc, char *argv[])
{
time_t t;

t = 0;
printf("Hello, world! %s\n", ctime(&t));

return 0;
}

reports
Allocation totals: 7 total, 6 leaked
Leaked User Memory: 1.257 kB
Peak User Memory: 1.565 kB
NJAMD Overhead at peak: 10.435 kB
Peak NJAMD Overhead: 22.743 kB
Average NJAMD Overhead: 3.770 kB per alloc
Address space used: 56.000 kB
NJAMD Overhead at exit: 22.743 kB

The cause is ctime() uses static memory but njamd should
not report memory leaks in this case.