Papers/programming

_msize

tomato13 2008. 3. 13. 16:30

// Returns the size of a memory block allocated in the heap

size_t _msize( void *memblock );

 

http://kin.naver.com/detail/detail.php?d1id=1&dir_id=10104&eid=436Bm5SIbPeZHMKXqBXlaVy4bJ00bCbV&qb=X21zaXpl

 

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