/[emacs]/emacs/src/buffer.c
ViewVC logotype

Diff of /emacs/src/buffer.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.380 by monnier, Mon Mar 4 23:20:06 2002 UTC revision 1.381 by gerd, Tue Apr 16 07:34:36 2002 UTC
# Line 1  Line 1 
1  /* Buffer manipulation primitives for GNU Emacs.  /* Buffer manipulation primitives for GNU Emacs.
2     Copyright (C) 1985,86,87,88,89,93,94,95,97,98, 1999, 2000, 2001     Copyright (C) 1985,86,87,88,89,93,94,95,97,98, 1999, 2000, 2001, 2002
3          Free Software Foundation, Inc.          Free Software Foundation, Inc.
4    
5  This file is part of GNU Emacs.  This file is part of GNU Emacs.
# Line 4343  static int mmap_initialized_p; Line 4343  static int mmap_initialized_p;
4343    
4344  #define MEM_ALIGN       sizeof (double)  #define MEM_ALIGN       sizeof (double)
4345    
4346    /* Predicate returning true if part of the address range [START ..
4347       END[ is currently mapped.  Used to prevent overwriting an existing
4348       memory mapping.
4349    
4350       Default is to conservativly assume the address range is occupied by
4351       something else.  This can be overridden by system configuration
4352       files if system-specific means to determine this exists.  */
4353    
4354    #ifndef MMAP_ALLOCATED_P
4355    #define MMAP_ALLOCATED_P(start, end) 1
4356    #endif
4357    
4358  /* Function prototypes.  */  /* Function prototypes.  */
4359    
4360  static int mmap_free_1 P_ ((struct mmap_region *));  static int mmap_free_1 P_ ((struct mmap_region *));
# Line 4435  mmap_enlarge (r, npages) Line 4447  mmap_enlarge (r, npages)
4447      }      }
4448    else if (npages > 0)    else if (npages > 0)
4449      {      {
       struct mmap_region *r2;  
         
4450        nbytes = npages * mmap_page_size;        nbytes = npages * mmap_page_size;
4451                
4452        /* Try to map additional pages at the end of the region.  We        /* Try to map additional pages at the end of the region.  We
4453           cannot do this if the address range is already occupied by           cannot do this if the address range is already occupied by
4454           something else because mmap deletes any previous mapping.           something else because mmap deletes any previous mapping.
4455           I'm not sure this is worth doing, let's see.  */           I'm not sure this is worth doing, let's see.  */
4456        r2 = mmap_find (region_end, region_end + nbytes);        if (!MMAP_ALLOCATED_P (region_end, region_end + nbytes))
       if (r2 == NULL)  
4457          {          {
4458            POINTER_TYPE *p;            POINTER_TYPE *p;
4459                

Legend:
Removed from v.1.380  
changed lines
  Added in v.1.381

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26