how to find size of memory allocated to a pointer?

Hi,

Am new to HP UX , is there a way to find out the size of memory allocated to a pointer on hp ux?

For example we can use the _msize() on windows to find the size of memory allocated to a pointer .

#include <stdio.h>
#include <malloc.h>

void main()
{

void *buffer;
buffer = malloc( 999 );
printf( "Size of block is %u bytes\n", _msize( buffer ) );

}

produces the output:
Size of block is 1000 bytes Is there any way this can be done on HP UX too?Thank you very much in advance.Regards