OSDN Git Service

Fix brk/sbrk error checking.
authorElliott Hughes <enh@google.com>
Sat, 26 Apr 2014 01:27:38 +0000 (18:27 -0700)
committerChristopher Ferris <cferris@google.com>
Fri, 13 May 2016 00:15:49 +0000 (17:15 -0700)
commitf36b5088a32775c44661fb6b348ed0b6b3b67e65
treed0f1970e216a9eb4f45dd40f3dd226cb1eb3f017
parentbeb6e08abf1393663151afde2742bb23eccab4e1
Fix brk/sbrk error checking.

Note that the kernel returns the current break on error or if the requested
break is smaller than the minimum break, or the new break. I don't know where
we got the idea that the kernel could return -1.

Also optimizes the query case.

Also hides an accidentally-exported symbol for LP64.

Bug: 28740702

(cherry picked from commit 533dde4dbf87d6615952be3654fc74e5ff2e1003)

Change-Id: Ied16987756a501acf292368a14e3727ad631efa5
libc/Android.mk
libc/bionic/brk.cpp
libc/bionic/sbrk.cpp [deleted file]
tests/unistd_test.cpp