Subj : Re: malloc and free To : borland.public.cpp.borlandcpp From : Alistair Date : Sun Jul 11 2004 11:13 pm _msize(void *pointer); Never mind! Why is it I look for ages and cant find a thing, then soon as I post a question I find the answer! Must be a Sunday Night Thing! (Normally a Monday morning?! Seems it has come early this week!) Cheers Alistair "Alistair" wrote in message news:40f1a7dc$1@newsgroups.borland.com... > char * memused = (char *)malloc(80); //allocate 80 bytes > memset(memused, '\0', 80); > strcpy(memused, "TEST"); > > How do i find out how many bytes memused has if I dont remember the value > 80? > strlen returns 4, which is correct, but I want the amount of memory > allocated in the first place. > > Does anyone know?! > > Cheers > > Alistair > > .