#include "host.h"
#include "callcpp.h"
Go to the source code of this file.
Functions |
void * | Emalloc (size_t Size) |
void * | Erealloc (void *ptr, size_t size) |
void | Efree (void *ptr) |
Macro Definition Documentation
#define ILLEGALMALLOCREQUEST 2001 |
#define NOTENOUGHMEMORY 2000 |
Include Files and Type Defines —————————————————————————-
Definition at line 27 of file emalloc.h.
Function Documentation
void* Emalloc |
( |
size_t |
Size | ) |
|
Public Function Prototypes —————————————————————————-
Include Files and Type Defines —————————————————————————- ---------------------------------------------------------------------------- Public Code —————————————————————————-
Definition at line 35 of file emalloc.cpp.
{
void *Buffer;
if (Size <= 0)
Buffer = (void *) malloc (Size);
}
else
return (Buffer);
}
void* Erealloc |
( |
void * |
ptr, |
|
|
size_t |
size |
|
) |
| |
Definition at line 70 of file emalloc.cpp.
{
void *Buffer;
if (size < 0 || (size == 0 && ptr ==
NULL))
Buffer = (void *) realloc (ptr, size);
if (Buffer ==
NULL && size != 0)
return (Buffer);
}