1 /* uClibc internal malloc.
2 Copyright (C) 2007 Denys Vlasenko
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public License
6 version 2 as published by the Free Software Foundation.
8 This library is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
13 You should have received a copy of the GNU Library General Public
14 License along with this library; see the file COPYING.LIB. If
15 not, see <http://www.gnu.org/licenses/>.
24 void (*__uc_malloc_failed
)(size_t size
) = NULL
;
25 /* Seemingly superfluous assigment of NULL above prevents gas error
26 * ("__uc_malloc_failed can't be equated to common symbol
27 * __GI___uc_malloc_failed") in libc_hidden_data_def: */
28 libc_hidden_data_def(__uc_malloc_failed
)
30 void *__uc_malloc(size_t size
)
38 if (!__uc_malloc_failed
)
41 __uc_malloc_failed(size
);
44 libc_hidden_def(__uc_malloc
)