| 1 | /* $Id: new.h,v 1.3 1999-11-10 01:45:32 bird Exp $
|
|---|
| 2 | *
|
|---|
| 3 | * new - new and delete operators.
|
|---|
| 4 | *
|
|---|
| 5 | * Copyright (c) 1998-1999 knut st. osmundsen
|
|---|
| 6 | *
|
|---|
| 7 | * Project Odin Software License can be found in LICENSE.TXT
|
|---|
| 8 | *
|
|---|
| 9 | */
|
|---|
| 10 |
|
|---|
| 11 | #ifndef _new_h_
|
|---|
| 12 | #define _new_h_
|
|---|
| 13 |
|
|---|
| 14 | /* check for IBMCPP new.h */
|
|---|
| 15 | #ifdef __new_h
|
|---|
| 16 | #error("A different version of new.h has allready been loaded!")
|
|---|
| 17 | #endif
|
|---|
| 18 | #define __new_h /* Defined to prevent IBMCPP new.h from being loaded. */
|
|---|
| 19 |
|
|---|
| 20 | /* size_t */
|
|---|
| 21 | #ifndef __size_t
|
|---|
| 22 | #define __size_t
|
|---|
| 23 | typedef unsigned int size_t;
|
|---|
| 24 | #endif
|
|---|
| 25 |
|
|---|
| 26 | #ifndef __DEBUG_ALLOC__
|
|---|
| 27 | /* The standard favourites */
|
|---|
| 28 | void *operator new(size_t size);
|
|---|
| 29 | void *operator new(size_t size, void *location); /* stub */
|
|---|
| 30 |
|
|---|
| 31 | void *operator new[](size_t size); /* stub */
|
|---|
| 32 | void *operator new[](size_t size, void *location);/* stub */
|
|---|
| 33 |
|
|---|
| 34 | void operator delete(void *location);
|
|---|
| 35 | void operator delete[](void *location); /* stub */
|
|---|
| 36 | #endif
|
|---|
| 37 |
|
|---|
| 38 | #ifdef __DEBUG_ALLOC__
|
|---|
| 39 | void *operator new(size_t size, const char *filename, size_t lineno);
|
|---|
| 40 | void *operator new(size_t size, const char *filename, size_t lineno, void *location);
|
|---|
| 41 |
|
|---|
| 42 | void *operator new[](size_t size, const char *filename, size_t lineno);
|
|---|
| 43 | void *operator new[](size_t size, const char *filename, size_t lineno, void *location);
|
|---|
| 44 |
|
|---|
| 45 | void operator delete(void *location, const char *filename, size_t lineno);
|
|---|
| 46 | void operator delete[](void *location, const char *filename, size_t lineno);
|
|---|
| 47 | #endif
|
|---|
| 48 |
|
|---|
| 49 | #endif
|
|---|
| 50 |
|
|---|