src/windows/native/sun/windows/alloc.h
Print this page
*** 24,33 ****
--- 24,38 ----
*/
#ifndef _ALLOC_H_
#define _ALLOC_H_
+ /* Use THIS_FILE when it is available. */
+ #ifndef THIS_FILE
+ #define THIS_FILE __FILE__
+ #endif
+
#include "stdhdrs.h"
// By defining std::bad_alloc in a local header file instead of including
// the Standard C++ <new> header file, we avoid making awt.dll dependent
// on msvcp50.dll. This reduces the size of the JRE by 500kb.
*** 125,140 ****
throw (std::bad_alloc);
void * CDECL operator new(size_t size, const char *, int)
throw (std::bad_alloc);
#define safe_Malloc(size) \
! safe_Malloc_outofmem(size, __FILE__, __LINE__)
#define safe_Calloc(num, size) \
! safe_Calloc_outofmem(num, size, __FILE__, __LINE__)
#define safe_Realloc(memblock, size) \
! safe_Realloc_outofmem(memblock, size, __FILE__, __LINE__)
! #define new new(__FILE__, __LINE__)
#endif /* OUTOFMEM_TEST */
#define TRY \
try { \
entry_point(); \
--- 130,145 ----
throw (std::bad_alloc);
void * CDECL operator new(size_t size, const char *, int)
throw (std::bad_alloc);
#define safe_Malloc(size) \
! safe_Malloc_outofmem(size, THIS_FILE, __LINE__)
#define safe_Calloc(num, size) \
! safe_Calloc_outofmem(num, size, THIS_FILE, __LINE__)
#define safe_Realloc(memblock, size) \
! safe_Realloc_outofmem(memblock, size, THIS_FILE, __LINE__)
! #define new new(THIS_FILE, __LINE__)
#endif /* OUTOFMEM_TEST */
#define TRY \
try { \
entry_point(); \