티스토리 뷰
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
- GSX 1000 pro
- 볼륨 낮춤
- C++
- structure
- QPrinter.Letter
- TCGA
- volume dial
- TensorBoard
- tensorflow
- destructor
- QPrinter.A4
- 볼륨 조절
- MSVC++
- Visual C++
- PyQt
- GSX 1200 pro
- how to solve it
- Python
- 설치
- Item 9
- QT
- dll
- pandas
- CanDrA
- ctypes
- 이상한 문자
- armadillo c++
- Accelerated C++
- matrix multiplication
- cython
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함