emacs-diffs
[Top][All Lists]
Advanced

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

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


From: Gerd Moellmann
Subject: [Emacs-diffs] Changes to emacs/src/buffer.c
Date: Tue, 16 Apr 2002 03:36:19 -0400

Index: emacs/src/buffer.c
diff -c emacs/src/buffer.c:1.380 emacs/src/buffer.c:1.381
*** emacs/src/buffer.c:1.380    Mon Mar  4 18:20:06 2002
--- emacs/src/buffer.c  Tue Apr 16 03:34:36 2002
***************
*** 1,5 ****
  /* Buffer manipulation primitives for GNU Emacs.
!    Copyright (C) 1985,86,87,88,89,93,94,95,97,98, 1999, 2000, 2001
        Free Software Foundation, Inc.
  
  This file is part of GNU Emacs.
--- 1,5 ----
  /* Buffer manipulation primitives for GNU Emacs.
!    Copyright (C) 1985,86,87,88,89,93,94,95,97,98, 1999, 2000, 2001, 2002
        Free Software Foundation, Inc.
  
  This file is part of GNU Emacs.
***************
*** 4343,4348 ****
--- 4343,4360 ----
  
  #define MEM_ALIGN     sizeof (double)
  
+ /* Predicate returning true if part of the address range [START ..
+    END[ is currently mapped.  Used to prevent overwriting an existing
+    memory mapping.
+ 
+    Default is to conservativly assume the address range is occupied by
+    something else.  This can be overridden by system configuration
+    files if system-specific means to determine this exists.  */
+ 
+ #ifndef MMAP_ALLOCATED_P
+ #define MMAP_ALLOCATED_P(start, end) 1
+ #endif
+ 
  /* Function prototypes.  */
  
  static int mmap_free_1 P_ ((struct mmap_region *));
***************
*** 4435,4450 ****
      }
    else if (npages > 0)
      {
-       struct mmap_region *r2;
-       
        nbytes = npages * mmap_page_size;
        
        /* Try to map additional pages at the end of the region.  We
         cannot do this if the address range is already occupied by
         something else because mmap deletes any previous mapping.
         I'm not sure this is worth doing, let's see.  */
!       r2 = mmap_find (region_end, region_end + nbytes);
!       if (r2 == NULL)
        {
          POINTER_TYPE *p;
        
--- 4447,4459 ----
      }
    else if (npages > 0)
      {
        nbytes = npages * mmap_page_size;
        
        /* Try to map additional pages at the end of the region.  We
         cannot do this if the address range is already occupied by
         something else because mmap deletes any previous mapping.
         I'm not sure this is worth doing, let's see.  */
!       if (!MMAP_ALLOCATED_P (region_end, region_end + nbytes))
        {
          POINTER_TYPE *p;
        



reply via email to

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