Context algorithm
Semi-predictive context algorithm implementation
|
Go to the source code of this file.
Macros | |
#define | REALLOCSPACE(S, T, N) (T *) realloc(S,sizeof(T) * (size_t) (N)) |
Resizes a block of memory. More... | |
#define | REALLOC(V, S, T, N) |
Resizes a block of memory and prints an error message if necessary. More... | |
#define | FREE(P) |
Frees a block of memory and makes the pointer NULL. More... | |
#define | CALLOC(S, T, N) |
Allocs a new block of memory and sets all its bits to zero. More... | |
#define | MALLOC(S, T, N) |
#define CALLOC | ( | S, | |
T, | |||
N | |||
) |
Allocs a new block of memory and sets all its bits to zero.
[out] | S | pointer to the new allocated memory. |
[in] | T | type of the objects that will be stored in this memory area. |
[in] | N | number of objects of type T that will be possible to store in the new memory. |
Definition at line 72 of file spacedef.h.
#define FREE | ( | P | ) |
Frees a block of memory and makes the pointer NULL.
[in] | P | pointer to the memory to free. |
Definition at line 58 of file spacedef.h.
#define MALLOC | ( | S, | |
T, | |||
N | |||
) |
Definition at line 81 of file spacedef.h.
#define REALLOC | ( | V, | |
S, | |||
T, | |||
N | |||
) |
Resizes a block of memory and prints an error message if necessary.
[out] | V | pointer that will point to the resized memory. |
[in] | S | pointer to the memory to resize. |
[in] | T | type of the objects that are stored in the memory to resize. |
[in] | N | number of objects of type T that will be possible to store in the resized memory. |
Definition at line 43 of file spacedef.h.
#define REALLOCSPACE | ( | S, | |
T, | |||
N | |||
) | (T *) realloc(S,sizeof(T) * (size_t) (N)) |
Resizes a block of memory.
[in] | S | pointer to the memory to resize. |
[in] | T | type of the objects that are stored in the memory to resize. |
[in] | N | number of objects of type T that will be possible to store in the resized memory. |
Definition at line 32 of file spacedef.h.