comparison src/gmalloc.c @ 452:3d3049ae1304 r21-2-41

Import from CVS: tag r21-2-41
author cvs
date Mon, 13 Aug 2007 11:40:21 +0200
parents abe6d1db359e
children e9a3f8b4de53
comparison
equal deleted inserted replaced
451:8ad70c5cd5d7 452:3d3049ae1304
1230 1230
1231 /* Allocate INCREMENT more bytes of data space, 1231 /* Allocate INCREMENT more bytes of data space,
1232 and return the start of data space, or NULL on errors. 1232 and return the start of data space, or NULL on errors.
1233 If INCREMENT is negative, shrink data space. */ 1233 If INCREMENT is negative, shrink data space. */
1234 __ptr_t 1234 __ptr_t
1235 __default_morecore ( 1235 __default_morecore (ptrdiff_t increment)
1236 #ifdef __STDC__ 1236 {
1237 ptrdiff_t increment 1237 __ptr_t result = (__ptr_t) __sbrk (increment);
1238 #else
1239 #ifdef OSF1
1240 long increment
1241 #else
1242 int increment
1243 #endif
1244 #endif
1245 )
1246 {
1247 #ifdef OSF1
1248 __ptr_t result = (__ptr_t) __sbrk ((ssize_t) increment);
1249 #else
1250 __ptr_t result = (__ptr_t) __sbrk ((int) increment);
1251 #endif
1252 if (result == (__ptr_t) -1) 1238 if (result == (__ptr_t) -1)
1253 return NULL; 1239 return NULL;
1254 return result; 1240 return result;
1255 } 1241 }
1256 /* Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc. 1242 /* Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.