- Timestamp:
- 2012-02-28T13:59:00+13:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/common-src/indexers/mg/lib/gmalloc.c
r16583 r25147 401 401 { 402 402 __ptr_t result; 403 unsigned long intadj;403 mg_u_long adj; 404 404 405 405 result = (*__morecore) (size); 406 adj = ( unsigned long int) ((unsigned long int) ((char *) result -406 adj = (mg_u_long) ((mg_u_long) ((char *) result - 407 407 (char *) NULL)) % BLOCKSIZE; 408 408 if (adj != 0) … … 549 549 block = BLOCK (result); 550 550 if (--_heapinfo[block].busy.info.frag.nfree != 0) 551 _heapinfo[block].busy.info.frag.first = ( unsigned long int)552 (( unsigned long int) ((char *) next->next - (char *) NULL)551 _heapinfo[block].busy.info.frag.first = (mg_u_long) 552 ((mg_u_long) ((char *) next->next - (char *) NULL) 553 553 % BLOCKSIZE) >> log; 554 554 … … 872 872 prev = (struct list *) ptr; 873 873 _heapinfo[block].busy.info.frag.nfree = 1; 874 _heapinfo[block].busy.info.frag.first = ( unsigned long int)875 (( unsigned long int) ((char *) ptr - (char *) NULL)874 _heapinfo[block].busy.info.frag.first = (mg_u_long) 875 ((mg_u_long) ((char *) ptr - (char *) NULL) 876 876 % BLOCKSIZE >> type); 877 877 prev->next = _fraghead[type].next; … … 1284 1284 { 1285 1285 __ptr_t result; 1286 unsignedlong int adj;1286 mg_u_long int adj; 1287 1287 1288 1288 size = ((size + alignment - 1) / alignment) * alignment; … … 1291 1291 if (result == NULL) 1292 1292 return NULL; 1293 adj = ( unsigned long int) ((unsigned long int) ((char *) result -1293 adj = (mg_u_long) ((mg_u_long) ((char *) result - 1294 1294 (char *) NULL)) % alignment; 1295 1295 if (adj != 0)
Note:
See TracChangeset
for help on using the changeset viewer.