emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/alloc.c


From: Andreas Schwab
Subject: [Emacs-diffs] Changes to emacs/src/alloc.c
Date: Sun, 07 Sep 2003 15:15:33 -0400

Index: emacs/src/alloc.c
diff -c emacs/src/alloc.c:1.322 emacs/src/alloc.c:1.323
*** emacs/src/alloc.c:1.322     Mon Sep  1 11:45:51 2003
--- emacs/src/alloc.c   Sun Sep  7 15:15:32 2003
***************
*** 711,717 ****
  #define ABLOCKS_BASE(abase) (abase)
  #else
  #define ABLOCKS_BASE(abase) \
!   (1 & (int) ABLOCKS_BUSY (abase) ? abase : ((void**)abase)[-1])
  #endif
  
  /* The list of free ablock.   */
--- 711,717 ----
  #define ABLOCKS_BASE(abase) (abase)
  #else
  #define ABLOCKS_BASE(abase) \
!   (1 & (long) ABLOCKS_BUSY (abase) ? abase : ((void**)abase)[-1])
  #endif
  
  /* The list of free ablock.   */
***************
*** 792,808 ****
          abase->blocks[i].x.next_free = free_ablock;
          free_ablock = &abase->blocks[i];
        }
!       ABLOCKS_BUSY (abase) = (struct ablocks *) aligned;
  
        eassert (0 == ((EMACS_UINT)abase) % BLOCK_ALIGN);
        eassert (ABLOCK_ABASE (&abase->blocks[3]) == abase); /* 3 is arbitrary 
*/
        eassert (ABLOCK_ABASE (&abase->blocks[0]) == abase);
        eassert (ABLOCKS_BASE (abase) == base);
!       eassert (aligned == (int)ABLOCKS_BUSY (abase));
      }
  
    abase = ABLOCK_ABASE (free_ablock);
!   ABLOCKS_BUSY (abase) = (struct ablocks *) (2 + (int) ABLOCKS_BUSY (abase));
    val = free_ablock;
    free_ablock = free_ablock->x.next_free;
  
--- 792,808 ----
          abase->blocks[i].x.next_free = free_ablock;
          free_ablock = &abase->blocks[i];
        }
!       ABLOCKS_BUSY (abase) = (struct ablocks *) (long) aligned;
  
        eassert (0 == ((EMACS_UINT)abase) % BLOCK_ALIGN);
        eassert (ABLOCK_ABASE (&abase->blocks[3]) == abase); /* 3 is arbitrary 
*/
        eassert (ABLOCK_ABASE (&abase->blocks[0]) == abase);
        eassert (ABLOCKS_BASE (abase) == base);
!       eassert (aligned == (long) ABLOCKS_BUSY (abase));
      }
  
    abase = ABLOCK_ABASE (free_ablock);
!   ABLOCKS_BUSY (abase) = (struct ablocks *) (2 + (long) ABLOCKS_BUSY (abase));
    val = free_ablock;
    free_ablock = free_ablock->x.next_free;
  
***************
*** 834,844 ****
    ablock->x.next_free = free_ablock;
    free_ablock = ablock;
    /* Update busy count.  */
!   ABLOCKS_BUSY (abase) = (struct ablocks *) (-2 + (int) ABLOCKS_BUSY (abase));
    
!   if (2 > (int) ABLOCKS_BUSY (abase))
      { /* All the blocks are free.  */
!       int i = 0, aligned = (int) ABLOCKS_BUSY (abase);
        struct ablock **tem = &free_ablock;
        struct ablock *atop = &abase->blocks[aligned ? ABLOCKS_SIZE : 
ABLOCKS_SIZE - 1];
  
--- 834,844 ----
    ablock->x.next_free = free_ablock;
    free_ablock = ablock;
    /* Update busy count.  */
!   ABLOCKS_BUSY (abase) = (struct ablocks *) (-2 + (long) ABLOCKS_BUSY 
(abase));
    
!   if (2 > (long) ABLOCKS_BUSY (abase))
      { /* All the blocks are free.  */
!       int i = 0, aligned = (long) ABLOCKS_BUSY (abase);
        struct ablock **tem = &free_ablock;
        struct ablock *atop = &abase->blocks[aligned ? ABLOCKS_SIZE : 
ABLOCKS_SIZE - 1];
  




reply via email to

[Prev in Thread] Current Thread [Next in Thread]