[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Windows realloc & GNU
From: |
Conrad T. Pino |
Subject: |
RE: Windows realloc & GNU |
Date: |
Tue, 20 Sep 2005 15:24:25 -0700 |
> From: Derek Price [mailto:derek@ximbiot.com]
>
> Assuming you mean that this works, I think it will be fine:
>
> p = realloc (NULL, 0);
> free (p);
This definitely works:
char c, *p;
p = realloc (NULL, 0);
c = p[0];
free (p);
Referencing p[0] is fine, writing p[0] is NOT a trap or fault.
IMO debug run time library "free" does a guard byte test.
- Windows realloc & GNU, Conrad T. Pino, 2005/09/20
- Re: Windows realloc & GNU, Derek Price, 2005/09/20
- RE: Windows realloc & GNU, Conrad T. Pino, 2005/09/20
- Re: Windows realloc & GNU, Derek Price, 2005/09/20
- RE: Windows realloc & GNU, Conrad T. Pino, 2005/09/20
- Re: Windows realloc & GNU, Derek Price, 2005/09/20
- RE: Windows realloc & GNU, Conrad T. Pino, 2005/09/20
- Re: Windows realloc & GNU, Derek Price, 2005/09/20
- RE: Windows realloc & GNU,
Conrad T. Pino <=