Date: Thu, 8 Nov 2001 11:07:23 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Raf256 cc: djgpp AT delorie DOT com Subject: Re: sizeof void* ? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Thu, 8 Nov 2001, Raf256 wrote: > I have memor area like : > void *ptr = malloc(1024); > realloc(ptr, ???); > > how can I here check current size of memory block that begins in ptr ? You can't; not portably, anyway: there's no standard function to return that info. The usual technique is to store the allocated size in a separate variable.