about summary refs log tree commit diff
path: root/sysdeps/generic/sbrk.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/generic/sbrk.c')
-rw-r--r--sysdeps/generic/sbrk.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/sysdeps/generic/sbrk.c b/sysdeps/generic/sbrk.c
index d3ea705294..afed5902dc 100644
--- a/sysdeps/generic/sbrk.c
+++ b/sysdeps/generic/sbrk.c
@@ -38,22 +38,8 @@ __sbrk (ptrdiff_t increment)
      instances of __brk and __sbrk can share the heap, returning
      interleaved pieces of it.  */
   if (__curbrk == NULL || __libc_multiple_libcs)
-    {
-      extern void _end;
-
-      if (__brk (0) < 0)		/* Initialize the break.  */
-	return (void *) -1;
-
-      /* Align break address to page boundary if not happened before.  */
-      if (!__libc_multiple_libcs && __curbrk == &_end)
-	{
-	  size_t pg = __getpagesize ();
-	  ptrdiff_t rest = pg - ((&_end - (void *) 0) & (pg - 1));
-
-	  if (__brk (__curbrk + rest) < 0)
-	    return (void *) -1;
-	}
-    }
+    if (__brk (0) < 0)		/* Initialize the break.  */
+      return (void *) -1;
 
   if (increment == 0)
     return __curbrk;