]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Cleanup some old leftover of AIX port + fix a comment
authorPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Sun, 20 Apr 2014 19:50:13 +0000 (19:50 +0000)
committerPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Sun, 20 Apr 2014 19:50:13 +0000 (19:50 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13902

coregrind/m_aspacemgr/aspacemgr-linux.c
coregrind/m_mallocfree.c
coregrind/pub_core_aspacemgr.h

index 2633f4f05508f4757cf7d6588204814b137f2d14..dddbe37b52e324c1d7b719e944685488a5e16519 100644 (file)
@@ -2421,21 +2421,6 @@ SysRes VG_(am_mmap_anon_float_client) ( SizeT length, Int prot )
 }
 
 
-/* Similarly, acquire new address space for the client but with
-   considerable restrictions on what can be done with it: (1) the
-   actual protections may exceed those stated in 'prot', (2) the
-   area's protections cannot be later changed using any form of
-   mprotect, and (3) the area cannot be freed using any form of
-   munmap.  On Linux this behaves the same as
-   VG_(am_mmap_anon_float_client).  On AIX5 this *may* allocate memory
-   by using sbrk, so as to make use of large pages on AIX. */
-
-SysRes VG_(am_sbrk_anon_float_client) ( SizeT length, Int prot )
-{
-   return VG_(am_mmap_anon_float_client) ( length, prot );
-}
-
-
 /* Map anonymously at an unconstrained address for V, and update the
    segment array accordingly.  This is fundamentally how V allocates
    itself more address space when needed. */
@@ -2541,15 +2526,6 @@ void* VG_(am_shadow_alloc)(SizeT size)
    return sr_isError(sres) ? NULL : (void*)sr_Res(sres);
 }
 
-/* Same comments apply as per VG_(am_sbrk_anon_float_client).  On
-   Linux this behaves the same as VG_(am_mmap_anon_float_valgrind). */
-
-SysRes VG_(am_sbrk_anon_float_valgrind)( SizeT cszB )
-{
-   return VG_(am_mmap_anon_float_valgrind)( cszB );
-}
-
-
 /* Map a file at an unconstrained address for V, and update the
    segment array accordingly. Use the provided flags */
 
index 95806b4f8d54124b65b55ba7350a1badfd46e435..411899bd8245ae75df4e53109cd1491dfe1b5acb 100644 (file)
@@ -815,12 +815,8 @@ Superblock* newSuperblock ( Arena* a, SizeT cszB )
 
    if (a->clientmem) {
       // client allocation -- return 0 to client if it fails
-      if (unsplittable)
-         sres = VG_(am_mmap_anon_float_client)
-                   ( cszB, VKI_PROT_READ|VKI_PROT_WRITE|VKI_PROT_EXEC );
-      else
-         sres = VG_(am_sbrk_anon_float_client)
-                   ( cszB, VKI_PROT_READ|VKI_PROT_WRITE|VKI_PROT_EXEC );
+      sres = VG_(am_mmap_anon_float_client)
+         ( cszB, VKI_PROT_READ|VKI_PROT_WRITE|VKI_PROT_EXEC );
       if (sr_isError(sres))
          return 0;
       sb = (Superblock*)(AddrH)sr_Res(sres);
@@ -830,10 +826,7 @@ Superblock* newSuperblock ( Arena* a, SizeT cszB )
       VG_(am_set_segment_isCH_if_SkAnonC)( VG_(am_find_nsegment)( (Addr)sb ) );
    } else {
       // non-client allocation -- abort if it fails
-      if (unsplittable)
-         sres = VG_(am_mmap_anon_float_valgrind)( cszB );
-      else
-         sres = VG_(am_sbrk_anon_float_valgrind)( cszB );
+      sres = VG_(am_mmap_anon_float_valgrind)( cszB );
       if (sr_isError(sres)) {
          VG_(out_of_memory_NORETURN)("newSuperblock", cszB);
          /* NOTREACHED */
@@ -1610,7 +1603,7 @@ void* VG_(arena_malloc) ( ArenaId aid, const HChar* cc, SizeT req_pszB )
    vg_assert(a->sblocks_used <= a->sblocks_size);
    if (a->sblocks_used == a->sblocks_size) {
       Superblock ** array;
-      SysRes sres = VG_(am_sbrk_anon_float_valgrind)(sizeof(Superblock *) *
+      SysRes sres = VG_(am_mmap_anon_float_valgrind)(sizeof(Superblock *) *
                                                      a->sblocks_size * 2);
       if (sr_isError(sres)) {
          VG_(out_of_memory_NORETURN)("arena_init", sizeof(Superblock *) * 
index b6b4e4f8fcf2af0361a7cd058efe39898d968830..a9ea5302a12b2109d1063b0696d8df1aee28ec04 100644 (file)
@@ -229,27 +229,11 @@ extern SysRes VG_(am_mmap_anon_fixed_client)
    update the segment array accordingly.  */
 extern SysRes VG_(am_mmap_anon_float_client) ( SizeT length, Int prot );
 
-/* Similarly, acquire new address space for the client but with
-   considerable restrictions on what can be done with it: (1) the
-   actual protections may exceed those stated in 'prot', (2) the
-   area's protections cannot be later changed using any form of
-   mprotect, and (3) the area cannot be freed using any form of
-   munmap.  On Linux this behaves the same as
-   VG_(am_mmap_anon_float_client).  On AIX5 this *may* allocate memory
-   by using sbrk, so as to make use of large pages on AIX. */
-extern SysRes VG_(am_sbrk_anon_float_client) ( SizeT length, Int prot );
-
-
 /* Map anonymously at an unconstrained address for V, and update the
    segment array accordingly.  This is fundamentally how V allocates
    itself more address space when needed. */
 extern SysRes VG_(am_mmap_anon_float_valgrind)( SizeT cszB );
 
-/* Same comments apply as per VG_(am_sbrk_anon_float_client).  On
-   Linux this behaves the same as VG_(am_mmap_anon_float_valgrind). */
-extern SysRes VG_(am_sbrk_anon_float_valgrind)( SizeT cszB );
-
-
 /* Map privately a file at an unconstrained address for V, and update the
    segment array accordingly.  This is used by V for transiently
    mapping in object files to read their debug info.  */
@@ -363,7 +347,7 @@ typedef
    VgStack;
 
 
-/* Allocate and initialise a VgStack (anonymous client space).
+/* Allocate and initialise a VgStack (anonymous valgrind space).
    Protect the stack active area and the guard areas appropriately.
    Returns NULL on failure, else the address of the bottom of the
    stack.  On success, also sets *initial_sp to what the stack pointer