Ignore:
Timestamp:
08/11/95 14:33:04 (28 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
8d47a15
Parents:
4e58d80
Message:

Added functions to access the errno of the native system when using the
newlib C library.

Fixed bug where length did not take into account amount added
for alignment requirements.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/libcsupport/src/malloc.c

    r4e58d80 r4cc631db  
    5454  rtems_status_code   status;
    5555  void               *starting_address;
     56  rtems_unsigned32    old_address;
    5657  rtems_unsigned32    u32_address;
    5758
     
    7475
    7576    if (u32_address & (CPU_ALIGNMENT-1)) {
     77      old_address = u32_address;
    7678      u32_address = (u32_address + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
    77       /* XXX: if we do any alignment .. then length should be shortened */
     79
     80      /*
     81       *  Adjust the length by whatever we aligned by
     82       */
     83
     84      length -= u32_address - old_address;
    7885    }
    7986
Note: See TracChangeset for help on using the changeset viewer.