티스토리 뷰
int main () { const size_t ELEM_NUM = 10; cout << "Test 객체의 크기는" << sizeof(Test) << endl; cout << sizeof((Test *)new Test) << endl; // auto array cout << "Test arrTest[ELEM_NUM];" << endl; Test arrTest[ELEM_NUM]; // allocator cout << endl << "Test * ptrTest = alloc.allocate(ELEM_NUM);" << endl; allocatoralloc; Test * ptrTest = alloc.allocate(ELEM_NUM); // my implementation for allocation cout << endl << "Test * ptr = allocation (ELEM_NUM);" << endl; Test * ptr = allocation (ELEM_NUM); free(ptr); Test * it = ptrTest + ELEM_NUM; while (it != ptrTest) { alloc.destroy(--it); } alloc.deallocate(ptrTest, ELEM_NUM); _CrtDumpMemoryLeaks(); // system("PAUSE"); return 0; }
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- 볼륨 조절
- structure
- volume dial
- QPrinter.A4
- 볼륨 낮춤
- 설치
- how to solve it
- Visual C++
- matrix multiplication
- ctypes
- dll
- destructor
- CanDrA
- GSX 1200 pro
- 이상한 문자
- PyQt
- pandas
- Python
- QPrinter.Letter
- tensorflow
- C++
- cython
- QT
- GSX 1000 pro
- TensorBoard
- TCGA
- Item 9
- MSVC++
- armadillo c++
- Accelerated C++
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함