Branch: Tag:

2002-11-20

2002-11-20 18:02:05 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Code cleanup.

Rev: src/block_alloc.h:1.50

2:   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: block_alloc.h,v 1.49 2002/11/20 17:33:42 grubba Exp $ + || $Id: block_alloc.h,v 1.50 2002/11/20 18:02:05 grubba Exp $   */      #undef PRE_INIT_BLOCK
145:   void PIKE_CONCAT3(really_free_,DATA,_unlocked)(struct DATA *d) \   { \    struct PIKE_CONCAT(DATA,_block) *blk = PIKE_CONCAT(DATA,_free_blocks); \ +  EXIT_BLOCK(d); \    if(blk == NULL || (char *)d < (char *)blk || \    (char *)d >= (char *)(blk->x+(BSIZE))) { \    blk = PIKE_CONCAT(DATA,_blocks); \
167:    if(PIKE_CONCAT(DATA,_free_blocks) == NULL) \    PIKE_CONCAT(DATA,_free_blocks) = blk; \    } \ -  EXIT_BLOCK(d); \ +     DO_IF_DMALLOC( PIKE_CONCAT(check_free_,DATA)(d); \    dmalloc_mark_as_free(d, 1); ) \    d->BLOCK_ALLOC_NEXT = (void *)blk->PIKE_CONCAT3(free_,DATA,s); \
203:    blk = PIKE_CONCAT(DATA,_blocks); \    if((char *)d < (char *)blk || \    (char *)d >= (char *)(blk->x+(BSIZE))) { \ -  do \ +  do { \    blk = blk->next; \ -  while((char *)d < (char *)blk || \ +  } while((char *)d < (char *)blk || \    (char *)d >= (char *)(blk->x+(BSIZE))); \    if(blk == PIKE_CONCAT(DATA,_free_blocks)) \    PIKE_CONCAT(DATA,_free_blocks) = blk->prev; \
264:    { \    PIKE_CONCAT(DATA,_blocks)=tmp->next; \    /* Mark meta-block as available, since libc will mess with it. */ \ -  PIKE_MEM_RW(tmp, sizeof(*tmp)); \ +  PIKE_MEM_RW(&tmp->x, sizeof(tmp->x)); \    free((char *)tmp); \    } \    PIKE_CONCAT(DATA,_blocks)=0; \