Tesseract  3.02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
memry.cpp File Reference
#include "mfcpch.h"
#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 52 of file memry.cpp.

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

Definition at line 48 of file memry.cpp.

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

Definition at line 31 of file memry.cpp.

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

Definition at line 40 of file memry.cpp.

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

Definition at line 60 of file memry.cpp.

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

Definition at line 56 of file memry.cpp.

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

Definition at line 36 of file memry.cpp.

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

Definition at line 44 of file memry.cpp.

44  {
45  free(deadstruct);
46 }