Changeset 69be1a22 in rtems


Ignore:
Timestamp:
Oct 20, 2015, 7:47:10 PM (4 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
master
Children:
e96feeb
Parents:
bc792bb
git-author:
Joel Sherrill <joel.sherrill@…> (10/20/15 19:47:10)
git-committer:
Joel Sherrill <joel.sherrill@…> (10/27/15 12:31:29)
Message:

CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK was undocumented and not error checked

closes #2431.

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • cpukit/sapi/include/confdefs.h

    rbc792bb r69be1a22  
    38243824#endif
    38253825
     3826/*
     3827 * IMFS block size for in memory files (memfiles) must be a power of
     3828 * two between 16 and 512 inclusive.
     3829 */
     3830#if ((CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK != 16) && \
     3831     (CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK != 32) && \
     3832     (CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK != 64) && \
     3833     (CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK != 128) && \
     3834     (CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK != 256) && \
     3835     (CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK != 512))
     3836  #error "IMFS Memfile block size must be a power of 2 between 16 and 512"
     3837#endif
     3838
     3839
    38263840#endif
    38273841/* end of include file */
  • doc/user/conf.t

    rbc792bb r69be1a22  
    27482748@item @code{CONFIGURE_IMFS_DISABLE_UNMOUNT}.
    27492749@end itemize
     2750
     2751@c
     2752@c === CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK ===
     2753@c
     2754@subsection Specify Block Size for IMFS
     2755
     2756@findex CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK
     2757
     2758@table @b
     2759@item CONSTANT:
     2760@code{CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK}
     2761
     2762@item DATA TYPE:
     2763Boolean feature macro.
     2764
     2765@item RANGE:
     2766Valid values for this configuration parameter are a power of two (2)
     2767between 16 and 512 inclusive.  In other words, valid values are 16,
     276832, 64, 128, 256,and 512.
     2769
     2770@item DEFAULT VALUE:
     2771The default IMFS block size is 128 bytes.
     2772
     2773@end table
     2774
     2775@subheading DESCRIPTION:
     2776This configuration parameter specifies the block size for in-memory files
     2777managed by the IMFS. The configured block size has two impacts. The first
     2778is the average amount of unused memory in the last block of each file. For
     2779example, when the block size is 512, on average one-half of the last block
     2780of each file will remain unused and the memory is wasted. In contrast,
     2781when the block size is 16, the average unused memory per file is only
     27828 bytes. However, it requires more allocations for the same size file
     2783and thus more overhead per block for the dynamic memory management.
     2784
     2785Second, the block size has an impact on the maximum size file that can
     2786be stored in the IMFS. With smaller block size, the maximum file size
     2787is correspondingly smaller. The following shows the maximum file size
     2788possible based on the configured block size:
     2789
     2790@itemize @bullet
     2791@item when the block size is 16 bytes, the maximum file size is 1,328
     2792bytes.
     2793@item when the block size is 32 bytes, the maximum file size is 18,656
     2794bytes.
     2795@item when the block size is 64 bytes, the maximum file size is 279,488
     2796bytes.
     2797@item when the block size is 128 bytes, the maximum file size is
     27984,329,344 bytes.
     2799@item when the block size is 256 bytes, the maximum file size is
     280068,173,568 bytes.
     2801@item when the block size is 512 bytes, the maximum file size is
     28021,082,195,456 bytes.
     2803@end itemize
     2804
    27502805
    27512806@c
  • testsuites/psxtests/psximfs02/init.c

    rbc792bb r69be1a22  
    11/*
    2  *  COPYRIGHT (c) 1989-2014.
     2 *  COPYRIGHT (c) 1989-2015.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    212212
    213213#define CONFIGURE_MAXIMUM_TASKS                  1
    214 #define CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK   15
     214#define CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK   16
    215215#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 4
    216216#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
Note: See TracChangeset for help on using the changeset viewer.