Changeset 188 for trunk/kernel/mm/kmem.c
- Timestamp:
- Jul 12, 2017, 8:12:41 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/mm/kmem.c
r181 r188 82 82 uint32_t kmem_type_size( uint32_t type ) 83 83 { 84 if ( type == KMEM_PAGE ) return CONFIG_PPM_PAGE_SIZE; 85 else if( type == KMEM_GENERIC ) return 0; 86 else if( type == KMEM_KCM ) return sizeof( kcm_t ); 87 else if( type == KMEM_VSEG ) return sizeof( vseg_t ); 88 else if( type == KMEM_DEVICE ) return sizeof( chdev_t ); 89 else if( type == KMEM_MAPPER ) return sizeof( mapper_t ); 90 else if( type == KMEM_PROCESS ) return sizeof( process_t ); 91 else if( type == KMEM_CPU_CTX ) return sizeof( hal_cpu_context_t ); 92 else if( type == KMEM_FPU_CTX ) return sizeof( hal_fpu_context_t ); 93 else if( type == KMEM_BARRIER ) return sizeof( remote_barrier_t ); 94 95 else if( type == KMEM_FATFS_INODE ) return sizeof( fatfs_inode_t ); 96 else if( type == KMEM_FATFS_CTX ) return sizeof( fatfs_ctx_t ); 97 else if( type == KMEM_DEVFS_INODE ) return sizeof( devfs_inode_t ); 98 else if( type == KMEM_MUTEX ) return sizeof( remote_mutex_t ); 99 else if( type == KMEM_VFS_CTX ) return sizeof( vfs_ctx_t ); 100 else if( type == KMEM_VFS_INODE ) return sizeof( vfs_inode_t ); 101 else if( type == KMEM_VFS_DENTRY ) return sizeof( vfs_dentry_t ); 102 else if( type == KMEM_VFS_FILE ) return sizeof( vfs_file_t ); 103 else if( type == KMEM_SEM ) return sizeof( remote_sem_t ); 104 else if( type == KMEM_CONDVAR ) return sizeof( remote_condvar_t ); 105 84 if ( type == KMEM_PAGE ) return CONFIG_PPM_PAGE_SIZE; 85 else if( type == KMEM_GENERIC ) return 0; 86 else if( type == KMEM_KCM ) return sizeof( kcm_t ); 87 else if( type == KMEM_VSEG ) return sizeof( vseg_t ); 88 else if( type == KMEM_DEVICE ) return sizeof( chdev_t ); 89 else if( type == KMEM_MAPPER ) return sizeof( mapper_t ); 90 else if( type == KMEM_PROCESS ) return sizeof( process_t ); 91 else if( type == KMEM_CPU_CTX ) return CONFIG_CPU_CTX_SIZE; 92 else if( type == KMEM_FPU_CTX ) return CONFIG_FPU_CTX_SIZE; 93 else if( type == KMEM_BARRIER ) return sizeof( remote_barrier_t ); 94 95 else if( type == KMEM_DEVFS_CTX ) return sizeof( fatfs_ctx_t ); 96 else if( type == KMEM_FATFS_CTX ) return sizeof( fatfs_ctx_t ); 97 else if( type == KMEM_VFS_CTX ) return sizeof( vfs_ctx_t ); 98 else if( type == KMEM_VFS_INODE ) return sizeof( vfs_inode_t ); 99 else if( type == KMEM_VFS_DENTRY ) return sizeof( vfs_dentry_t ); 100 else if( type == KMEM_VFS_FILE ) return sizeof( vfs_file_t ); 101 else if( type == KMEM_SEM ) return sizeof( remote_sem_t ); 102 else if( type == KMEM_CONDVAR ) return sizeof( remote_condvar_t ); 103 else if( type == KMEM_MUTEX ) return sizeof( remote_mutex_t ); 106 104 else if( type == KMEM_512_BYTES ) return 512; 107 105 … … 123 121 else if( type == KMEM_BARRIER ) return "KMEM_BARRIER"; 124 122 125 else if( type == KMEM_FATFS_INODE ) return "KMEM_FATFS_INODE"; 126 else if( type == KMEM_FATFS_CTX ) return "KMEM_FATFS_CTX"; 127 else if( type == KMEM_DEVFS_INODE ) return "KMEM_DEVFS_INODE"; 128 else if( type == KMEM_MUTEX ) return "KMEM_MUTEX"; 129 else if( type == KMEM_VFS_CTX ) return "KMEM_VFS_CTX"; 130 else if( type == KMEM_VFS_INODE ) return "KMEM_VFS_INODE"; 131 else if( type == KMEM_VFS_DENTRY ) return "KMEM_VFS_DENTRY"; 132 else if( type == KMEM_VFS_FILE ) return "KMEM_VFS_FILE"; 133 else if( type == KMEM_SEM ) return "KMEM_SEM"; 134 else if( type == KMEM_SEM ) return "KMEM_CONDVAR"; 135 123 else if( type == KMEM_DEVFS_CTX ) return "KMEM_DEVFS_CTX"; 124 else if( type == KMEM_FATFS_CTX ) return "KMEM_FATFS_CTX"; 125 else if( type == KMEM_VFS_CTX ) return "KMEM_VFS_CTX"; 126 else if( type == KMEM_VFS_INODE ) return "KMEM_VFS_INODE"; 127 else if( type == KMEM_VFS_DENTRY ) return "KMEM_VFS_DENTRY"; 128 else if( type == KMEM_VFS_FILE ) return "KMEM_VFS_FILE"; 129 else if( type == KMEM_SEM ) return "KMEM_SEM"; 130 else if( type == KMEM_CONDVAR ) return "KMEM_CONDVAR"; 131 else if( type == KMEM_MUTEX ) return "KMEM_MUTEX"; 136 132 else if( type == KMEM_512_BYTES ) return "KMEM_512_BYTES"; 137 133
Note: See TracChangeset
for help on using the changeset viewer.