일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- dataframe
- Button
- RNN
- install
- index
- SPL
- keras
- LSTM
- pandas
- javascript
- ipad
- pip
- imread
- synology
- Series
- Splunk
- Lotto
- pycharm
- mariadb
- Python
- 삼성소프트웨어멤버십
- GitHub
- 알고리즘
- E-P1
- DFS
- mean
- SciPy
- GT-S80
- Numpy
- CNN
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