Changeset d8a5e14 in rtems


Ignore:
Timestamp:
Apr 20, 2021, 6:41:00 AM (2 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
6c66bbb
Parents:
2b32146
git-author:
Sebastian Huber <sebastian.huber@…> (04/20/21 06:41:00)
git-committer:
Sebastian Huber <sebastian.huber@…> (04/20/21 17:18:23)
Message:

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.

Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • cpukit/Makefile.am

    r2b32146 rd8a5e14  
    214214librtemscpu_a_SOURCES += libcsupport/src/resource_snapshot.c
    215215librtemscpu_a_SOURCES += libcsupport/src/rmdir.c
     216librtemscpu_a_SOURCES += libcsupport/src/rtemscalloc.c
    216217librtemscpu_a_SOURCES += libcsupport/src/rtems_heap_extend.c
    217218librtemscpu_a_SOURCES += libcsupport/src/rtems_heap_extend_via_sbrk.c
  • cpukit/libcsupport/src/malloc_deferred.c

    r2b32146 rd8a5e14  
    113113  return rtems_heap_allocate_aligned_with_boundary( size, 0, 0 );
    114114}
    115 
    116 void *rtems_calloc( size_t nelem, size_t elsize )
    117 {
    118   size_t  length;
    119   void   *p;
    120 
    121   length = nelem * elsize;
    122   p = rtems_malloc( length );
    123   RTEMS_OBFUSCATE_VARIABLE( p );
    124   if ( RTEMS_PREDICT_FALSE( p == NULL ) ) {
    125     return p;
    126   }
    127 
    128   return memset( p, 0, length );
    129 }
    130115#endif
  • spec/build/cpukit/librtemscpu.yml

    r2b32146 rd8a5e14  
    709709- cpukit/libcsupport/src/resource_snapshot.c
    710710- cpukit/libcsupport/src/rmdir.c
     711- cpukit/libcsupport/src/rtemscalloc.c
    711712- cpukit/libcsupport/src/rtems_heap_extend.c
    712713- cpukit/libcsupport/src/rtems_heap_extend_via_sbrk.c
Note: See TracChangeset for help on using the changeset viewer.