/* Declarations for `malloc' and friends.
- Copyright (C) 1990, 1991, 1992, 1993, 1995, 1996, 1999, 2002, 2003, 2004,
- 2005, 2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 1990-1993, 1995-1996, 1999, 2002-2007, 2013 Free
+ Software Foundation, Inc.
Written May 1989 by Mike Haertel.
This library is free software; you can redistribute it and/or
General Public License for more details.
You should have received a copy of the GNU General Public
-License along with this library; see the file COPYING. If
-not, write to the Free Software Foundation, Inc., 51 Franklin Street,
-Fifth Floor, Boston, MA 02110-1301, USA.
+License along with this library. If not, see <http://www.gnu.org/licenses/>.
The author may be reached (Email) at the address mike@ai.mit.edu,
or (US mail) as Mike Haertel c/o Free Software Foundation. */
#include <pthread.h>
#endif
+#ifdef WINDOWSNT
+#include <w32heap.h> /* for sbrk */
+#endif
+
#ifdef __cplusplus
extern "C"
{
General Public License for more details.
You should have received a copy of the GNU General Public
-License along with this library; see the file COPYING. If
-not, write to the Free Software Foundation, Inc., 51 Franklin Street,
-Fifth Floor, Boston, MA 02110-1301, USA.
+License along with this library. If not, see <http://www.gnu.org/licenses/>.
The author may be reached (Email) at the address mike@ai.mit.edu,
or (US mail) as Mike Haertel c/o Free Software Foundation. */
/* This is called when `_heapinfo' and `heapsize' have just
been set to describe a new info table. Set up the table
to describe itself and account for it in the statistics. */
-static inline void
+static void
register_heapinfo (void)
{
size_t block, blocks;
General Public License for more details.
You should have received a copy of the GNU General Public
-License along with this library; see the file COPYING. If
-not, write to the Free Software Foundation, Inc., 51 Franklin Street,
-Fifth Floor, Boston, MA 02110-1301, USA.
+License along with this library. If not, see <http://www.gnu.org/licenses/>.
The author may be reached (Email) at the address mike@ai.mit.edu,
or (US mail) as Mike Haertel c/o Free Software Foundation. */
General Public License for more details.
You should have received a copy of the GNU General Public
-License along with this library; see the file COPYING. If
-not, write to the Free Software Foundation, Inc., 51 Franklin Street,
-Fifth Floor, Boston, MA 02110-1301, USA.
+License along with this library. If not, see <http://www.gnu.org/licenses/>.
The author may be reached (Email) at the address mike@ai.mit.edu,
or (US mail) as Mike Haertel c/o Free Software Foundation. */
+#ifndef min
#define min(A, B) ((A) < (B) ? (A) : (B))
+#endif
/* On Cygwin the dumped emacs may try to realloc storage allocated in
the static heap. We just malloc space in the new heap and copy the
General Public License for more details.
You should have received a copy of the GNU General Public
-License along with this library; see the file COPYING. If
-not, write to the Free Software Foundation, Inc., 51 Franklin Street,
-Fifth Floor, Boston, MA 02110-1301, USA.
+License along with this library. If not, see <http://www.gnu.org/licenses/>.
The author may be reached (Email) at the address mike@ai.mit.edu,
or (US mail) as Mike Haertel c/o Free Software Foundation. */
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
-along with the GNU C Library; see the file COPYING. If not, write to
-the Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
-MA 02110-1301, USA. */
+along with the GNU C Library. If not, see <http://www.gnu.org/licenses/>. */
/* uClibc defines __GNU_LIBRARY__, but it is not completely
compatible. */
General Public License for more details.
You should have received a copy of the GNU General Public
-License along with this library; see the file COPYING. If
-not, write to the Free Software Foundation, Inc., 51 Franklin Street,
-Fifth Floor, Boston, MA 02110-1301, USA. */
+License along with this library. If not, see <http://www.gnu.org/licenses/>. */
void *(*__memalign_hook) (size_t size, size_t alignment);
return result;
}
-#ifndef ENOMEM
-#define ENOMEM 12
-#endif
-
-#ifndef EINVAL
-#define EINVAL 22
-#endif
-
int
posix_memalign (void **memptr, size_t alignment, size_t size)
{
General Public License for more details.
You should have received a copy of the GNU General Public
-License along with this library; see the file COPYING. If
-not, write to the Free Software Foundation, Inc., 51 Franklin Street,
-Fifth Floor, Boston, MA 02110-1301, USA.
+License along with this library. If not, see <http://www.gnu.org/licenses/>.
The author may be reached (Email) at the address mike@ai.mit.edu,
or (US mail) as Mike Haertel c/o Free Software Foundation. */
General Public License for more details.
You should have received a copy of the GNU General Public
-License along with this library; see the file COPYING. If
-not, write to the Free Software Foundation, Inc., 51 Franklin Street,
-Fifth Floor, Boston, MA 02110-1301, USA.
+License along with this library. If not, see <http://www.gnu.org/licenses/>.
The author may be reached (Email) at the address mike@ai.mit.edu,
or (US mail) as Mike Haertel c/o Free Software Foundation. */