MCPcopy Index your code
hub / github.com/MapServer/MapServer / msSmallMalloc

Function msSmallMalloc

maputil.c:2138–2161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2136/* Safe version of malloc(). This function is taken from gdal/cpl. */
2137
2138void *msSmallMalloc( size_t nSize )
2139{
2140 void *pReturn;
2141
2142 if( nSize == 0 )
2143 return NULL;
2144
2145 if( nSize < 0 )
2146 {
2147 fprintf(stderr, "msSmallMalloc(%ld): Silly size requested.\n",
2148 (long) nSize );
2149 return NULL;
2150 }
2151
2152 pReturn = malloc( nSize );
2153 if( pReturn == NULL )
2154 {
2155 fprintf(stderr, "msSmallMalloc(): Out of memory allocating %ld bytes.\n",
2156 (long) nSize );
2157 exit(1);
2158 }
2159
2160 return pReturn;
2161}
2162
2163/************************************************************************/
2164/* msSmallRealloc() */

Callers 15

maplexer.cFile · 0.85
treeNodeCreateFunction · 0.85
msSHPDiskTreeOpenFunction · 0.85
msCreateTreeFunction · 0.85
searchDiskTreeNodeFunction · 0.85
readTreeNodeFunction · 0.85
writeTreeNodeFunction · 0.85
msWriteTreeFunction · 0.85
FLTInsertElementInNodeFunction · 0.85
loadQueryParamsFunction · 0.85
msQuantizeRasterBufferFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected