MCPcopy Create free account
hub / github.com/creatale/node-dv / Emalloc

Function Emalloc

deps/tesseract/cutil/emalloc.cpp:47–60  ·  view source on GitHub ↗

---------------------------------------------------------------------------- Public Code ----------------------------------------------------------------------------*/ * This routine attempts to allocate the specified number of * bytes. If the memory can be allocated, a pointer to the * memory is returned. If the memory cannot be allocated, or * if the allocation request is nega

Source from the content-addressed store, hash-verified

45 * @note History: 4/3/89, DSJ, Created.
46*/
47void *Emalloc(int Size) {
48 void *Buffer;
49
50 if (Size <= 0)
51 DoError (ILLEGALMALLOCREQUEST, "Illegal malloc request size");
52 Buffer = (void *) malloc (Size);
53 if (Buffer == NULL) {
54 DoError (NOTENOUGHMEMORY, "Not enough memory");
55 return (NULL);
56 }
57 else
58 return (Buffer);
59
60} /* Emalloc */
61
62
63/*---------------------------------------------------------------------------*/

Callers 15

NewCharDescriptionFunction · 0.85
MakeClustererFunction · 0.85
MakeSampleFunction · 0.85
CreateClusterTreeFunction · 0.85
MakeNewClusterFunction · 0.85
TestEllipticalProtoFunction · 0.85
ComputeStatisticsFunction · 0.85
NewEllipticalProtoFunction · 0.85
NewMixedProtoFunction · 0.85
NewSimpleProtoFunction · 0.85
MakeBucketsFunction · 0.85
NewChiStructFunction · 0.85

Calls 1

DoErrorFunction · 0.85

Tested by 1

TestEllipticalProtoFunction · 0.68