|
From: <sv...@va...> - 2015-05-10 10:40:17
|
Author: florian
Date: Sun May 10 11:40:09 2015
New Revision: 15200
Log:
VG_(am_create_reservation) and VG_(am_extend_into_adjacent_reservation_client)
no longer need to externally visible.
Modified:
branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-linux.c
branches/ASPACEM_TWEAKS/coregrind/pub_core_aspacemgr.h
Modified: branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-linux.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-linux.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-linux.c Sun May 10 11:40:09 2015
@@ -2745,8 +2745,8 @@
falls entirely within a single free segment. The returned Bool
indicates whether the creation succeeded. */
-Bool VG_(am_create_reservation) ( Addr start, SizeT length,
- ShrinkMode smode, SSizeT extra )
+static Bool create_reservation (Addr start, SizeT length,
+ ShrinkMode smode, SSizeT extra)
{
Int startI, endI;
NSegment seg;
@@ -2808,9 +2808,9 @@
the reservation segment after the operation must be at least one
page long. The function returns a pointer to the resized segment. */
-const NSegment *VG_(am_extend_into_adjacent_reservation_client)( Addr addr,
- SSizeT delta,
- Bool *overflow)
+static const NSegment *
+extend_into_adjacent_reservation_client (Addr addr, SSizeT delta,
+ Bool *overflow)
{
Int segA, segR;
UInt prot;
@@ -2941,8 +2941,7 @@
/* Try to create the data seg and associated reservation where
BASE says. */
- ok = VG_(am_create_reservation)( resvn_start, resvn_size,
- SmLower, anon_size );
+ ok = create_reservation(resvn_start, resvn_size, SmLower, anon_size);
if (!ok) {
/* Hmm, that didn't work. Well, let aspacem suggest an address
@@ -2951,8 +2950,7 @@
( 0/*floating*/, anon_size + resvn_size, &ok );
if (ok) {
resvn_start = anon_start + anon_size;
- ok = VG_(am_create_reservation)( resvn_start, resvn_size,
- SmLower, anon_size );
+ ok = create_reservation(resvn_start, resvn_size, SmLower, anon_size);
}
}
@@ -3018,8 +3016,8 @@
aspacem_assert(VG_IS_PAGE_ALIGNED(delta));
Bool overflow;
- if (! VG_(am_extend_into_adjacent_reservation_client)( aseg->start, delta,
- &overflow)) {
+ if (! extend_into_adjacent_reservation_client(aseg->start, delta,
+ &overflow)) {
if (overflow)
return VG_(mk_SysRes_Error)(1);
else
@@ -3056,8 +3054,7 @@
/* Create a shrinkable reservation followed by an anonymous
segment. Together these constitute a growdown stack. */
- ok = VG_(am_create_reservation)( resvn_start, resvn_size,
- SmUpper, anon_size );
+ ok = create_reservation(resvn_start, resvn_size, SmUpper, anon_size);
if (ok)
return VG_(am_mmap_anon_fixed_client)( anon_start, anon_size, prot );
@@ -3098,8 +3095,8 @@
VG_(debugLog)(1, "signals",
"extending a stack base 0x%lx down by %lu\n",
anon_seg->start, udelta);
- if (! VG_(am_extend_into_adjacent_reservation_client)
- ( anon_seg->start, -(SSizeT)udelta, &overflow )) {
+ if (! extend_into_adjacent_reservation_client(anon_seg->start,
+ -(SSizeT)udelta, &overflow)) {
if (overflow)
sres = VG_(mk_SysRes_Error)(1);
else
Modified: branches/ASPACEM_TWEAKS/coregrind/pub_core_aspacemgr.h
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/pub_core_aspacemgr.h (original)
+++ branches/ASPACEM_TWEAKS/coregrind/pub_core_aspacemgr.h Sun May 10 11:40:09 2015
@@ -262,32 +262,6 @@
expected to belong to a client segment. */
extern void VG_(am_set_segment_hasT)( Addr addr );
-/* --- --- --- reservations --- --- --- */
-
-/* Create a reservation from START .. START+LENGTH-1, with the given
- ShrinkMode. When checking whether the reservation can be created,
- also ensure that at least abs(EXTRA) extra free bytes will remain
- above (> 0) or below (< 0) the reservation.
-
- The reservation will only be created if it, plus the extra-zone,
- falls entirely within a single free segment. The returned Bool
- indicates whether the creation succeeded. */
-extern Bool VG_(am_create_reservation)
- ( Addr start, SizeT length, ShrinkMode smode, SSizeT extra );
-
-/* ADDR is the start address of an anonymous client mapping. This fn extends
- the mapping by DELTA bytes, taking the space from a reservation section
- which must be adjacent. If DELTA is positive, the segment is
- extended forwards in the address space, and the reservation must be
- the next one along. If DELTA is negative, the segment is extended
- backwards in the address space and the reservation must be the
- previous one. DELTA must be page aligned. abs(DELTA) must not
- exceed the size of the reservation segment minus one page, that is,
- the reservation segment after the operation must be at least one
- page long. The function returns a pointer to the resized segment. */
-extern const NSegment *VG_(am_extend_into_adjacent_reservation_client)
- ( Addr addr, SSizeT delta, /*OUT*/Bool *overflow );
-
/* --- --- --- resizing/move a mapping --- --- --- */
/* This function grows a client mapping in place into an adjacent free segment.
|