Changeset 4 for abuse/trunk/src/imlib/jmalloc.cpp
- Timestamp:
- Nov 6, 2005, 11:39:38 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
abuse/trunk/src/imlib/jmalloc.cpp
r2 r4 169 169 for (;f;f=f->next); // scan through static big list 170 170 171 int i,bit ;171 int i,bit=1; 172 172 for (i=0;i<JM_SMALL_SIZE;i++) 173 173 { … … 215 215 { 216 216 fprintf(fp,"*** Small Block size = %d ***\n",i); 217 unsigned long x=0,bit=1;217 unsigned long bit=1; 218 218 char *addr=((char *)(s+1)); 219 219 for (int j=0;j<32;j++) … … 252 252 { 253 253 fprintf(fp,"*** Small Block size = %d ***\n",i); 254 unsigned long x=0,bit=1;254 unsigned long bit=1; 255 255 char *addr=((char *)(s+1)); 256 256 for (int j=0;j<32;j++) … … 348 348 } else 349 349 { 350 int bit=1,i=0 ,offset=0;350 int bit=1,i=0; 351 351 char *addr=((char *)s)+sizeof(small_block); 352 352 while (1) // we already know there is a bit free … … 380 380 s->size=-s->size; 381 381 382 if (s->size-size> sizeof(memory_node)+4) // is there enough space to split the block?382 if (s->size-size>(int)sizeof(memory_node)+4) // is there enough space to split the block? 383 383 { 384 384 memory_node *p=(memory_node *)((char *)s+sizeof(memory_node)+size); … … 431 431 } else 432 432 { 433 int bit=1,i=0 ,offset=0;433 int bit=1,i=0; 434 434 char *addr=((char *)s)+sizeof(small_block); 435 435 while (1) // we already know there is a bit free … … 486 486 s->size=-s->size; 487 487 488 if (s->size-size> sizeof(memory_node)+4) // is there enough space to split the block?488 if (s->size-size>(int)sizeof(memory_node)+4) // is there enough space to split the block? 489 489 { 490 490 memory_node *p=s; // store this position … … 882 882 char *reportpath; 883 883 reportpath = (char *)jmalloc( strlen( get_save_filename_prefix() ) + strlen( filename ), "reportpath" ); 884 sprintf( reportpath, "%s%s \0", get_save_filename_prefix(), filename );884 sprintf( reportpath, "%s%s", get_save_filename_prefix(), filename ); 885 885 886 886 FILE *fp = fopen( reportpath, "wb" );
Note: See TracChangeset
for help on using the changeset viewer.