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