Permalink
Browse files

alloc memory max bug fix

  • Loading branch information...
cloudwu committed Mar 9, 2012
1 parent 8dcb9ac commit 794857e67f2e70e3612a546b0f4c29beee8bb8f0
Showing with 1 addition and 1 deletion.
  1. +1 −1 test.c
View
2 test.c
@@ -16,7 +16,7 @@ my_alloc(void * ud, void *ptr, size_t sz) {
void *p = malloc(sz);
++ cookie->count;
cookie->current += sz;
- if (cookie->max > cookie->current) {
+ if (cookie->max < cookie->current) {
cookie->max = cookie->current;
}
// printf("%p + %u\n",p, sz);

0 comments on commit 794857e

Please sign in to comment.