fixes #2 : greedy realloc.

Signed-off-by: Wilfried Chauveau <ithinuel@gmail.com>