#3583 closed enhancement (fixed)

Add rtems_malloc() and rtems_calloc()

Reported by: Sebastian Huber Owned by: Sebastian Huber
Priority: normal Milestone: 5.1
Component: rtems Version: 5
Severity: normal Keywords:
Cc: Blocked By:


The standard C/POSIX functions malloc() and calloc() set errno in case of an error. A dependency to errno pulls in getreent() which pulls in a lot of data structures and functions. This is an issue in low level code especially in the area of a basic board support package initialization and device drivers.

Provide rtems_malloc() and rtems_calloc() functions declared in <rtems/malloc.h> which do the same as the corresponding C/POSIX functions except setting errno.

The posix_memalign() and aligned_alloc() functions do not have this issue with the errno.

Change History (2)

comment:1 Changed on Nov 12, 2018 at 2:43:46 PM by Sebastian Huber <sebastian.huber@…>

In c1f3c2b8/rtems:

score: Add and use malloc() family attributes

Update #3583.

comment:2 Changed on Nov 12, 2018 at 2:43:54 PM by Sebastian Huber <sebastian.huber@…>

Resolution: fixed
Status: assignedclosed

In 6efc831/rtems:

Add rtems_malloc() and rtems_calloc()

Close #3583.

Note: See TracTickets for help on using tickets.