All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
memry.cpp File Reference
#include "memry.h"
#include <stdlib.h>

Go to the source code of this file.

Functions

char * alloc_string (inT32 count)
 
void free_string (char *string)
 
void * alloc_struct (inT32 count, const char *)
 
void free_struct (void *deadstruct, inT32, const char *)
 
void * alloc_mem (inT32 count)
 
void * alloc_big_zeros (inT32 count)
 
void free_mem (void *oldchunk)
 
void free_big_mem (void *oldchunk)
 

Function Documentation

void* alloc_big_zeros ( inT32  count)

Definition at line 51 of file memry.cpp.

51  {
52  return calloc(static_cast<size_t>(count), 1);
53 }
int count(LIST var_list)
Definition: oldlist.cpp:108
void* alloc_mem ( inT32  count)

Definition at line 47 of file memry.cpp.

47  {
48  return malloc(static_cast<size_t>(count));
49 }
int count(LIST var_list)
Definition: oldlist.cpp:108
char* alloc_string ( inT32  count)

Definition at line 30 of file memry.cpp.

30  {
31  // Round up the amount allocated to a multiple of 4
32  return static_cast<char*>(malloc((count + 3) & ~3));
33 }
int count(LIST var_list)
Definition: oldlist.cpp:108
void* alloc_struct ( inT32  count,
const char *   
)

Definition at line 39 of file memry.cpp.

39  {
40  return malloc(count);
41 }
int count(LIST var_list)
Definition: oldlist.cpp:108
void free_big_mem ( void *  oldchunk)

Definition at line 59 of file memry.cpp.

59  {
60  free(oldchunk);
61 }
void free_mem ( void *  oldchunk)

Definition at line 55 of file memry.cpp.

55  {
56  free(oldchunk);
57 }
void free_string ( char *  string)

Definition at line 35 of file memry.cpp.

35  {
36  free(string);
37 }
void free_struct ( void *  deadstruct,
inT32  ,
const char *   
)

Definition at line 43 of file memry.cpp.

43  {
44  free(deadstruct);
45 }