일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
Tags
- Numpy
- CNN
- SPL
- javascript
- DFS
- pip
- Button
- keras
- ipad
- 삼성소프트웨어멤버십
- pandas
- RNN
- install
- imread
- dataframe
- LSTM
- pycharm
- synology
- E-P1
- GT-S80
- 알고리즘
- GitHub
- mariadb
- SciPy
- Python
- mean
- Series
- index
- Lotto
- Splunk
Archives
- Today
- Total
잠토의 잠망경
HeapAlloc & HeapFree & GetProcessHeap & HeapReAlloc & HeapSize 본문
#undef UNICODE #include#include void HeapAllocation() { PINT32 p; //HeapAlloc: Default 영역이나 개인이 만든 Heap에 메모리를 할당하고자 할때 사용 //GetProcessHeap: Retrieve a heandle to the heap of the calling process p=(PINT32)HeapAlloc(GetProcessHeap(), 0, sizeof(int)*10); printf("first Pointer: %x\n",p); //HeapSize: Retrieve the size of a memory block allocated from heap printf("HeapSize: %d\n",HeapSize(GetProcessHeap(),0,p)); for(int i=0; i<10;i++) { printf("%d ",p[i]=i*2); } p=(PINT32)HeapReAlloc(GetProcessHeap(),0,p,100); printf("\n\nsecond Pointer: %x\n",p); printf("HeapSize: %d\n",HeapSize(GetProcessHeap(),0,p)); //HeapFree: Frees a memory block allocated from a heap HeapFree(GetProcessHeap(),0,p); } int main(void) { HeapAllocation(); return 0; }
Comments