diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-04-20 08:41:00 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-04-20 19:18:23 +0200 |
commit | d8a5e140ec44a5e45cf82d3759a339e9dedced56 (patch) | |
tree | b159ba580e893b698c029dcd586aa358734bbdc8 /cpukit/libcsupport/src/malloc_deferred.c | |
parent | Remove superfluous <rtems/score/wkspace.h> includes (diff) | |
download | rtems-d8a5e140ec44a5e45cf82d3759a339e9dedced56.tar.bz2 |
libcsupport: Move rtems_calloc()
Move rtems_calloc() since it only depends on rtems_malloc(). This may
make it easier to customize the heap allocator.
Change licence to BSD-2-Clause according to file history.
Update #3053.
Diffstat (limited to 'cpukit/libcsupport/src/malloc_deferred.c')
-rw-r--r-- | cpukit/libcsupport/src/malloc_deferred.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/cpukit/libcsupport/src/malloc_deferred.c b/cpukit/libcsupport/src/malloc_deferred.c index f66dd54676..b319d1213e 100644 --- a/cpukit/libcsupport/src/malloc_deferred.c +++ b/cpukit/libcsupport/src/malloc_deferred.c @@ -112,19 +112,4 @@ void *rtems_malloc( size_t size ) return rtems_heap_allocate_aligned_with_boundary( size, 0, 0 ); } - -void *rtems_calloc( size_t nelem, size_t elsize ) -{ - size_t length; - void *p; - - length = nelem * elsize; - p = rtems_malloc( length ); - RTEMS_OBFUSCATE_VARIABLE( p ); - if ( RTEMS_PREDICT_FALSE( p == NULL ) ) { - return p; - } - - return memset( p, 0, length ); -} #endif |