Changeset eaa5ea84 in rtems


Ignore:
Timestamp:
Nov 20, 2018, 3:22:56 PM (5 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
5fc727f
Parents:
1947449
git-author:
Sebastian Huber <sebastian.huber@…> (11/20/18 15:22:56)
git-committer:
Sebastian Huber <sebastian.huber@…> (11/26/18 06:51:57)
Message:

score: Introduce <rtems/score/heapinfo.h>

Move Heap_Information_block to separate header file to hide heap
implementation details from <rtems.h>.

Update #3598.

Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • cpukit/headers.am

    r1947449 reaa5ea84  
    319319include_rtems_score_HEADERS += include/rtems/score/heap.h
    320320include_rtems_score_HEADERS += include/rtems/score/heapimpl.h
     321include_rtems_score_HEADERS += include/rtems/score/heapinfo.h
    321322include_rtems_score_HEADERS += include/rtems/score/interr.h
    322323include_rtems_score_HEADERS += include/rtems/score/io.h
  • cpukit/include/rtems/rtems/types.h

    r1947449 reaa5ea84  
    2727#include <sys/_timeval.h>
    2828#include <stdint.h>
    29 #include <rtems/score/heap.h>
     29#include <rtems/score/heapinfo.h>
    3030#include <rtems/score/object.h>
    3131#include <rtems/score/watchdogticks.h>
  • cpukit/include/rtems/score/heap.h

    r1947449 reaa5ea84  
    2020
    2121#include <rtems/score/cpu.h>
     22#include <rtems/score/heapinfo.h>
    2223
    2324#ifdef __cplusplus
     
    248249  Heap_Block *prev;
    249250};
    250 
    251 /**
    252  * @brief Run-time heap statistics.
    253  *
    254  * The value @a searches / @a allocs gives the mean number of searches per
    255  * allocation, while @a max_search gives maximum number of searches ever
    256  * performed on a single allocation call.
    257  */
    258 typedef struct {
    259   /**
    260    * @brief Lifetime number of bytes allocated from this heap.
    261    *
    262    * This value is an integral multiple of the page size.
    263    */
    264   uint64_t lifetime_allocated;
    265 
    266   /**
    267    * @brief Lifetime number of bytes freed to this heap.
    268    *
    269    * This value is an integral multiple of the page size.
    270    */
    271   uint64_t lifetime_freed;
    272 
    273   /**
    274    * @brief Size of the allocatable area in bytes.
    275    *
    276    * This value is an integral multiple of the page size.
    277    */
    278   uintptr_t size;
    279 
    280   /**
    281    * @brief Current free size in bytes.
    282    *
    283    * This value is an integral multiple of the page size.
    284    */
    285   uintptr_t free_size;
    286 
    287   /**
    288    * @brief Minimum free size ever in bytes.
    289    *
    290    * This value is an integral multiple of the page size.
    291    */
    292   uintptr_t min_free_size;
    293 
    294   /**
    295    * @brief Current number of free blocks.
    296    */
    297   uint32_t free_blocks;
    298 
    299   /**
    300    * @brief Maximum number of free blocks ever.
    301    */
    302   uint32_t max_free_blocks;
    303 
    304   /**
    305    * @brief Current number of used blocks.
    306    */
    307   uint32_t used_blocks;
    308 
    309   /**
    310    * @brief Maximum number of blocks searched ever.
    311    */
    312   uint32_t max_search;
    313 
    314   /**
    315    * @brief Total number of searches.
    316    */
    317   uint32_t searches;
    318 
    319   /**
    320    * @brief Total number of successful allocations.
    321    */
    322   uint32_t allocs;
    323 
    324   /**
    325    * @brief Total number of failed allocations.
    326    */
    327   uint32_t failed_allocs;
    328 
    329   /**
    330    * @brief Total number of successful frees.
    331    */
    332   uint32_t frees;
    333 
    334   /**
    335    * @brief Total number of successful resizes.
    336    */
    337   uint32_t resizes;
    338 } Heap_Statistics;
    339251
    340252/**
     
    356268
    357269/**
    358  * @brief Information about blocks.
    359  */
    360 typedef struct {
    361   /**
    362    * @brief Number of blocks of this type.
    363    */
    364   uintptr_t number;
    365 
    366   /**
    367    * @brief Largest block of this type.
    368    */
    369   uintptr_t largest;
    370 
    371   /**
    372    * @brief Total size of the blocks of this type.
    373    */
    374   uintptr_t total;
    375 } Heap_Information;
    376 
    377 /**
    378  * @brief Information block returned by _Heap_Get_information().
    379  */
    380 typedef struct {
    381   Heap_Information Free;
    382   Heap_Information Used;
    383   Heap_Statistics Stats;
    384 } Heap_Information_block;
    385 
    386 /**
    387270 * @brief Heap area structure for table based heap initialization and
    388271 * extension.
  • testsuites/libtests/stackchk/blow.c

    r1947449 reaa5ea84  
    1818#include <rtems.h>
    1919#include <rtems/stackchk.h>
     20#include <rtems/score/heap.h>
    2021#include <rtems/score/percpu.h>
    2122
Note: See TracChangeset for help on using the changeset viewer.