Tesseract
3.02
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
freelist.cpp
Go to the documentation of this file.
1
/**************************************************************************
2
** Licensed under the Apache License, Version 2.0 (the "License");
3
** you may not use this file except in compliance with the License.
4
** You may obtain a copy of the License at
5
** http://www.apache.org/licenses/LICENSE-2.0
6
** Unless required by applicable law or agreed to in writing, software
7
** distributed under the License is distributed on an "AS IS" BASIS,
8
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9
** See the License for the specific language governing permissions and
10
** limitations under the License.
11
**************************************************************************/
12
#include "
freelist.h
"
13
14
#include <stdlib.h>
15
16
17
// With improvements in OS memory allocators, internal memory management is
18
// no longer required, so these functions all map to their malloc-family
19
// equivalents.
20
21
22
int
*
memalloc
(
int
size) {
23
return
static_cast<
int
*
>
(malloc(static_cast<size_t>(size)));
24
}
25
26
int
*
memrealloc
(
void
*ptr,
int
size,
int
oldsize) {
27
return
static_cast<
int
*
>
(realloc(ptr, static_cast<size_t>(size)));
28
}
29
30
void
memfree
(
void
*element) {
31
free(element);
32
}
mnt
data
src
tesseract-ocr
cutil
freelist.cpp
Generated on Thu Nov 1 2012 20:19:48 for Tesseract by
1.8.1