|
From: <sv...@va...> - 2014-04-20 19:50:23
|
Author: philippe
Date: Sun Apr 20 19:50:13 2014
New Revision: 13902
Log:
Cleanup some old leftover of AIX port + fix a comment
Modified:
trunk/coregrind/m_aspacemgr/aspacemgr-linux.c
trunk/coregrind/m_mallocfree.c
trunk/coregrind/pub_core_aspacemgr.h
Modified: trunk/coregrind/m_aspacemgr/aspacemgr-linux.c
==============================================================================
--- trunk/coregrind/m_aspacemgr/aspacemgr-linux.c (original)
+++ trunk/coregrind/m_aspacemgr/aspacemgr-linux.c Sun Apr 20 19:50:13 2014
@@ -2421,21 +2421,6 @@
}
-/* 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 @@
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 */
Modified: trunk/coregrind/m_mallocfree.c
==============================================================================
--- trunk/coregrind/m_mallocfree.c (original)
+++ trunk/coregrind/m_mallocfree.c Sun Apr 20 19:50:13 2014
@@ -815,12 +815,8 @@
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 @@
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 @@
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 *) *
Modified: trunk/coregrind/pub_core_aspacemgr.h
==============================================================================
--- trunk/coregrind/pub_core_aspacemgr.h (original)
+++ trunk/coregrind/pub_core_aspacemgr.h Sun Apr 20 19:50:13 2014
@@ -229,27 +229,11 @@
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 @@
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
|