Commit cf51085c579187f036a7b536e54c53b6ce56bb5b
- Diff rendering mode:
- inline
- side by side
src/allocators.cpp
(5 / 3)
|   | |||
| 57 | 57 | // memory leaks when run with debug CRT libraries. | |
| 58 | 58 | #if defined (_STLP_MSVC) && (_STLP_MSVC >= 1020 && defined (_STLP_DEBUG_ALLOC)) && !defined (_STLP_WCE) | |
| 59 | 59 | # include <crtdbg.h> | |
| 60 | inline void* __stlp_new_void_chunk(size_t __bytes) { | ||
| 61 | _STLP_CHECK_NULL_ALLOC(::operator new(__bytes, _CRT_BLOCK, __FILE__, __LINE__)); | ||
| 62 | } | ||
| 60 | 63 | inline char* __stlp_new_chunk(size_t __bytes) { | |
| 61 | void *__chunk = _STLP_CHECK_NULL_ALLOC(::operator new(__bytes, __FILE__, __LINE__)); | ||
| 62 | return __STATIC_CAST(char*, __chunk); | ||
| 64 | return __STATIC_CAST(char*, __stlp_new_void_chunk(__bytes)); | ||
| 63 | 65 | } | |
| 64 | inline void __stlp_delete_chunck(void* __p) { ::operator delete(__p, __FILE__, __LINE__); } | ||
| 66 | inline void __stlp_delete_chunck(void* __p) { ::operator delete(__p, _CRT_BLOCK, __FILE__, __LINE__); } | ||
| 65 | 67 | #else | |
| 66 | 68 | # ifdef _STLP_NODE_ALLOC_USE_MALLOC | |
| 67 | 69 | # include <cstdlib> |

