#include "host.h"
#include "callcpp.h"
Go to the source code of this file.
◆ ILLEGALMALLOCREQUEST
#define ILLEGALMALLOCREQUEST 2001 |
◆ NOTENOUGHMEMORY
#define NOTENOUGHMEMORY 2000 |
Include Files and Type Defines
Definition at line 27 of file emalloc.h.
◆ Efree()
Definition at line 79 of file emalloc.cpp.
#define ILLEGALMALLOCREQUEST
void DoError(int Error, const char *Message)
◆ Emalloc()
void* Emalloc |
( |
int |
Size | ) |
|
Public Function Prototypes
This routine attempts to allocate the specified number of bytes. If the memory can be allocated, a pointer to the memory is returned. If the memory cannot be allocated, or if the allocation request is negative or zero, an error is trapped.
- Parameters
-
Size | number of bytes of memory to be allocated |
- Returns
- Pointer to allocated memory.
- Note
- Exceptions:
-
History: 4/3/89, DSJ, Created.
Definition at line 47 of file emalloc.cpp.
52 Buffer = (
void *) malloc (Size);
#define ILLEGALMALLOCREQUEST
void DoError(int Error, const char *Message)
◆ Erealloc()
void* Erealloc |
( |
void * |
ptr, |
|
|
int |
size |
|
) |
| |
Definition at line 64 of file emalloc.cpp.
67 if (size < 0 || (size == 0 && ptr == NULL))
70 Buffer = (
void *) realloc (ptr, size);
71 if (Buffer == NULL && size != 0)
#define ILLEGALMALLOCREQUEST
void DoError(int Error, const char *Message)