Changeset 7c658fe in rtems


Ignore:
Timestamp:
Jun 30, 2010, 3:36:48 PM (9 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, master
Children:
59673224
Parents:
efc253fa
Message:

2010-06-30 Joel Sherrill <joel.sherrilL@…>

PR 1472/cpukit

  • libcsupport/Makefile.am, libcsupport/include/rtems/malloc.h, libcsupport/src/free.c, libcsupport/src/malloc.c, libcsupport/src/malloc_initialize.c, libcsupport/src/realloc.c, libcsupport/src/rtems_memalign.c: Remove malloc boundary code. It has not been used since before 4.6 and is bitrotted.
  • libcsupport/src/malloc_boundary.c: Removed.
Location:
cpukit
Files:
1 deleted
8 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    refc253fa r7c658fe  
     12010-06-30      Joel Sherrill <joel.sherrilL@OARcorp.com>
     2
     3        PR 1472/cpukit
     4        * libcsupport/Makefile.am, libcsupport/include/rtems/malloc.h,
     5        libcsupport/src/free.c, libcsupport/src/malloc.c,
     6        libcsupport/src/malloc_initialize.c, libcsupport/src/realloc.c,
     7        libcsupport/src/rtems_memalign.c: Remove malloc boundary code. It has
     8        not been used since before 4.6 and is bitrotted.
     9        * libcsupport/src/malloc_boundary.c: Removed.
     10
    1112010-06-30      Jennifer.Averett <Jennifer.Averett@OARcorp.com>
    212
  • cpukit/libcsupport/Makefile.am

    refc253fa r7c658fe  
    9090    src/mallocinfo.c src/malloc_walk.c src/malloc_get_statistics.c \
    9191    src/malloc_report_statistics.c src/malloc_report_statistics_plugin.c \
    92     src/malloc_statistics_helpers.c src/malloc_boundary.c \
    93     src/posix_memalign.c src/rtems_memalign.c src/malloc_deferred.c \
    94     src/malloc_sbrk_helpers.c src/malloc_dirtier.c src/malloc_p.h \
    95     src/rtems_malloc.c
     92    src/malloc_statistics_helpers.c src/posix_memalign.c \
     93    src/rtems_memalign.c src/malloc_deferred.c src/malloc_sbrk_helpers.c \
     94    src/malloc_dirtier.c src/malloc_p.h src/rtems_malloc.c
    9695
    9796PASSWORD_GROUP_C_FILES = src/getpwent.c
  • cpukit/libcsupport/include/rtems/malloc.h

    refc253fa r7c658fe  
    5555  rtems_malloc_statistics_helpers_table;
    5656extern rtems_malloc_statistics_functions_t *rtems_malloc_statistics_helpers;
    57 
    58 /*
    59  *  Malloc boundary support plugin
    60  */
    61 typedef struct {
    62   void     (*initialize)(void);
    63   uint32_t (*overhead)(void);
    64   void     (*at_malloc)(void *, size_t);
    65   void     (*at_free)(void *);
    66   void     (*at_realloc)(void *, size_t);
    67 } rtems_malloc_boundary_functions_t;
    68 
    69 extern rtems_malloc_boundary_functions_t rtems_malloc_boundary_helpers_table;
    70 extern rtems_malloc_boundary_functions_t *rtems_malloc_boundary_helpers;
    7157
    7258/*
  • cpukit/libcsupport/src/free.c

    refc253fa r7c658fe  
    3636   *  Do not attempt to free memory if in a critical section or ISR.
    3737   */
    38 
    3938  if ( _System_state_Is_up(_System_state_Get()) &&
    4039       !malloc_is_system_state_OK() ) {
     
    4241      return;
    4342  }
    44 
    45   #if defined(RTEMS_MALLOC_BOUNDARY_HELPERS)
    46     /*
    47      *  If configured, check the boundary area
    48      */
    49     if ( rtems_malloc_boundary_helpers )
    50       (*rtems_malloc_boundary_helpers->at_free)(ptr);
    51   #endif
    5243
    5344  /*
  • cpukit/libcsupport/src/malloc.c

    refc253fa r7c658fe  
    5656  #endif
    5757
    58   #if defined(RTEMS_MALLOC_BOUNDARY_HELPERS)
    59     /*
    60      *  If the support for a boundary area at the end of the heap
    61      *  block allocated is turned on, then adjust the size.
    62      */
    63     if (rtems_malloc_boundary_helpers)
    64       size += (*rtems_malloc_boundary_helpers->overhead)();
    65   #endif
    66 
    6758  /*
    6859   * Try to give a segment in the current heap if there is not
     
    9485    (*rtems_malloc_statistics_helpers->at_malloc)(return_this);
    9586
    96   #if defined(RTEMS_MALLOC_BOUNDARY_HELPERS)
    97     /*
    98      * If configured, set the boundary area
    99      */
    100     if (rtems_malloc_boundary_helpers)
    101       (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size);
    102   #endif
    103 
    10487  return return_this;
    10588}
  • cpukit/libcsupport/src/malloc_initialize.c

    refc253fa r7c658fe  
    4444)
    4545{
    46   #if defined(RTEMS_MALLOC_BOUNDARY_HELPERS)
    47     /*
    48      *  If configured, initialize the boundary support
    49      */
    50     if ( rtems_malloc_boundary_helpers != NULL ) {
    51       (*rtems_malloc_boundary_helpers->initialize)();
    52     }
    53   #endif
    54 
    5546  /*
    5647   *  If configured, initialize the statistics support
  • cpukit/libcsupport/src/realloc.c

    refc253fa r7c658fe  
    2828  uintptr_t old_size;
    2929  char    *new_area;
    30   uintptr_t resize;
    3130
    3231  MSBUMP(realloc_calls, 1);
     
    6160
    6261  /*
    63    *  If block boundary integrity checking is enabled, then
    64    *  we need to account for the boundary memory again.
     62   *  Now resize it.
    6563   */
    66   resize = size;
    67   #if defined(RTEMS_MALLOC_BOUNDARY_HELPERS)
    68     if (rtems_malloc_boundary_helpers)
    69       resize += (*rtems_malloc_boundary_helpers->overhead)();
    70   #endif
    71 
    72   if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, resize ) ) {
    73     #if defined(RTEMS_MALLOC_BOUNDARY_HELPERS)
    74       /*
    75        *  Successful resize.  Update the boundary on the same block.
    76        */
    77       if (rtems_malloc_boundary_helpers)
    78         (*rtems_malloc_boundary_helpers->at_realloc)(ptr, resize);
    79     #endif
     64  if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, size ) ) {
    8065    return ptr;
    8166  }
  • cpukit/libcsupport/src/rtems_memalign.c

    refc253fa r7c658fe  
    4646
    4747  /*
    48    *
    4948   *  If some free's have been deferred, then do them now.
    5049   */
    5150  malloc_deferred_frees_process();
    5251
    53   #if defined(RTEMS_MALLOC_BOUNDARY_HELPERS)
    54     /*
    55      *  If the support for a boundary area at the end of the heap
    56      *  block allocated is turned on, then adjust the size.
    57      */
    58     if (rtems_malloc_boundary_helpers)
    59       size += (*rtems_malloc_boundary_helpers->overhead)();
    60   #endif
    61 
    6252  /*
    6353   *  Perform the aligned allocation requested
    6454   */
    65 
    6655  return_this = _Protected_heap_Allocate_aligned(
    6756    RTEMS_Malloc_Heap,
Note: See TracChangeset for help on using the changeset viewer.