Browse code

- f_malloc was compiled in even if not used - fixed

Andrei Pelinescu-Onciul authored on 25/02/2003 16:57:43
Showing 1 changed files
... ...
@@ -26,7 +26,7 @@
26 26
  */
27 27
 
28 28
 
29
-#if !defined(q_malloc) && !(defined VQ_MALLOC) 
29
+#if !defined(q_malloc) && !(defined VQ_MALLOC)  && (defined F_MALLOC)
30 30
 
31 31
 #include <string.h>
32 32
 
... ...
@@ -292,9 +292,9 @@ void fm_status(struct fm_block* qm)
292 292
 
293 293
 	LOG(memlog, " heap size= %ld\n", qm->size);
294 294
 #ifdef DBG_F_MALLOC
295
-	LOG(memlog, " used= %d, used+overhead=%d, free=%d\n",
295
+	LOG(memlog, " used= %ld, used+overhead=%ld, free=%ld\n",
296 296
 			qm->used, qm->real_used, qm->size-qm->real_used);
297
-	LOG(memlog, " max used (+overhead)= %d\n", qm->max_real_used);
297
+	LOG(memlog, " max used (+overhead)= %ld\n", qm->max_real_used);
298 298
 #endif
299 299
 	/*
300 300
 	LOG(memlog, "dumping all fragments:\n");
... ...
@@ -314,9 +314,9 @@ void fm_status(struct fm_block* qm)
314 314
 		
315 315
 		for (f=qm->free_hash[h],j=0; f; size+=f->size,f=f->u.nxt_free,i++,j++);
316 316
 		if (j) LOG(memlog, "hash = %3d fragments no.: %5d,\n\t\t"
317
-							" bucket size: %9d - %9d (first %9ld)\n",
318
-							h, j, UN_HASH(h),
319
-							((h<F_MALLOC_OPTIMIZE/ROUNDTO)?1:2)*UN_HASH(h),
317
+							" bucket size: %9ld - %9ld (first %9ld)\n",
318
+							h, j, (long)UN_HASH(h),
319
+						(long)((h<F_MALLOC_OPTIMIZE/ROUNDTO)?1:2)*UN_HASH(h),
320 320
 							qm->free_hash[h]->size
321 321
 				);
322 322
 		/*