Changeset cb9bb9d1 in rtems
- Timestamp:
- 10/20/15 19:47:10 (7 years ago)
- Branches:
- 4.11
- Children:
- b2d788b3
- Parents:
- ad659ff8
- git-author:
- Joel Sherrill <joel.sherrill@…> (10/20/15 19:47:10)
- git-committer:
- Joel Sherrill <joel.sherrill@…> (10/27/15 12:32:41)
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
cpukit/sapi/include/confdefs.h
rad659ff8 rcb9bb9d1 3821 3821 #endif 3822 3822 3823 /* 3824 * IMFS block size for in memory files (memfiles) must be a power of 3825 * two between 16 and 512 inclusive. 3826 */ 3827 #if ((CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK != 16) && \ 3828 (CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK != 32) && \ 3829 (CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK != 64) && \ 3830 (CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK != 128) && \ 3831 (CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK != 256) && \ 3832 (CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK != 512)) 3833 #error "IMFS Memfile block size must be a power of 2 between 16 and 512" 3834 #endif 3835 3836 3823 3837 #endif 3824 3838 /* end of include file */ -
doc/user/conf.t
rad659ff8 rcb9bb9d1 2748 2748 @item @code{CONFIGURE_IMFS_DISABLE_UNMOUNT}. 2749 2749 @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: 2763 Boolean feature macro. 2764 2765 @item RANGE: 2766 Valid values for this configuration parameter are a power of two (2) 2767 between 16 and 512 inclusive. In other words, valid values are 16, 2768 32, 64, 128, 256,and 512. 2769 2770 @item DEFAULT VALUE: 2771 The default IMFS block size is 128 bytes. 2772 2773 @end table 2774 2775 @subheading DESCRIPTION: 2776 This configuration parameter specifies the block size for in-memory files 2777 managed by the IMFS. The configured block size has two impacts. The first 2778 is the average amount of unused memory in the last block of each file. For 2779 example, when the block size is 512, on average one-half of the last block 2780 of each file will remain unused and the memory is wasted. In contrast, 2781 when the block size is 16, the average unused memory per file is only 2782 8 bytes. However, it requires more allocations for the same size file 2783 and thus more overhead per block for the dynamic memory management. 2784 2785 Second, the block size has an impact on the maximum size file that can 2786 be stored in the IMFS. With smaller block size, the maximum file size 2787 is correspondingly smaller. The following shows the maximum file size 2788 possible 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 2792 bytes. 2793 @item when the block size is 32 bytes, the maximum file size is 18,656 2794 bytes. 2795 @item when the block size is 64 bytes, the maximum file size is 279,488 2796 bytes. 2797 @item when the block size is 128 bytes, the maximum file size is 2798 4,329,344 bytes. 2799 @item when the block size is 256 bytes, the maximum file size is 2800 68,173,568 bytes. 2801 @item when the block size is 512 bytes, the maximum file size is 2802 1,082,195,456 bytes. 2803 @end itemize 2804 2750 2805 2751 2806 @c -
testsuites/psxtests/psximfs02/init.c
rad659ff8 rcb9bb9d1 1 1 /* 2 * COPYRIGHT (c) 1989-201 4.2 * COPYRIGHT (c) 1989-2015. 3 3 * On-Line Applications Research Corporation (OAR). 4 4 * … … 212 212 213 213 #define CONFIGURE_MAXIMUM_TASKS 1 214 #define CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK 1 5214 #define CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK 16 215 215 #define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 4 216 216 #define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
Note: See TracChangeset
for help on using the changeset viewer.