>Блин, под виндами все ок, а под юниксами:
>bash-3.00# ./_check
>_check in realloc(): warning: junk pointer, too high to make sense а вы man realloc смотрели ?
realloc() changes the size of the memory block pointed to by ptr to size bytes. The contents
will be unchanged to the minimum of the old and new sizes; newly allocated memory will be
uninitialized. If ptr is NULL, the call is equivalent to malloc(size); if size is equal to
zero, the call is equivalent to free(ptr). Unless ptr is NULL, it must have been returned by
an earlier call to malloc(), calloc() or realloc(). If the area pointed to was moved, a
free(ptr) is done.
то есть память должна быть уже выделена по передаваемому указателю или если еще не выделили то указатель должен быть NULL.