Changeset 2050 for trunk/src/kmk/make.h
- Timestamp:
- Nov 3, 2008, 3:53:07 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/make.h
r2041 r2050 574 574 void alloccache_print_all (void); 575 575 struct alloccache_free_ent *alloccache_alloc_grow (struct alloccache *cache); 576 void alloccache_free (struct alloccache *cache, void *item); 576 577 577 578 /* Allocate an item. */ … … 602 603 } 603 604 604 /* Free an item. */605 MY_INLINE void606 alloccache_free (struct alloccache *cache, void *item)607 {608 struct alloccache_free_ent *f = (struct alloccache_free_ent *)item;609 #if 0 /*ndef NDEBUG*/610 struct alloccache_free_ent *c;611 unsigned int i = 0;612 for (c = cache->free_head; c != NULL; c = c->next, i++)613 MY_ASSERT_MSG (c != f && i < 0x10000000,614 ("i=%u total_count=%u\n", i, cache->total_count));615 #endif616 #ifdef __GNUC__617 /* GCC 3.2.3 has been observed having aliasing issues, so, setup a618 barrier for it here. */619 # if (__GNUC__ == 3 && __GNUC_PATCHLEVEL__ <= 3) || __GNUC__ < 3620 __asm__ __volatile__ ("" ::: "memory");621 # endif622 #endif623 624 f->next = cache->free_head;625 cache->free_head = f;626 MAKE_STATS(cache->free_count++;);627 }628 605 629 606 /* the alloc caches */
Note:
See TracChangeset
for help on using the changeset viewer.