// Returns the size of a memory block allocated in the heap
size_t _msize( void *memblock );
ex)
#include <malloc.h>
int TC14()
{
char* pStr;
int nSize;
pStr = (char*)malloc(10*sizeof(char));
nSize = _msize(pStr);
printf("nSize = %d\n", nSize);
return 1;
}
'Papers > programming' 카테고리의 다른 글
ascii value (0) | 2008.04.06 |
---|---|
polymorphism (0) | 2008.03.16 |
The usage of a static class function by an object (0) | 2008.03.12 |
[debug problem] memory allocation (0) | 2008.03.04 |
debugging problem (0) | 2008.02.26 |