Event var_compare_op: Added "(information)->object_blocks" due to comparison "(information)->object_blocks == 0" Also see events: [var_deref_op] At conditional (1): "(information)->object_blocks == 0" taking true path 69 if ( information->object_blocks == NULL ) 70 block_count = 0; 71 else { 72 block_count = information->maximum / information->allocation_size; 73 74 for ( ; block < block_count; block++ ) { 75 if ( information->object_blocks[ block ] == NULL ) 76 break; 77 else 78 index_base += information->allocation_size; 79 } 80 } 81 82 maximum = (uint32_t) information->maximum + information->allocation_size; 83 84 /* 85 * We need to limit the number of objects to the maximum number 86 * representable in the index portion of the object Id. In the 87 * case of 16-bit Ids, this is only 256 object instances. 88 */ At conditional (2): "maximum > 65535" taking false path 89 if ( maximum > OBJECTS_ID_FINAL_INDEX ) { 90 return; 91 } 92 93 /* 94 * Allocate the name table, and the objects and if it fails either return or 95 * generate a fatal error depending on auto-extending being active. 96 */ 97 block_size = information->allocation_size * information->size; At conditional (3): "(information)->auto_extend != 0" taking true path 98 if ( information->auto_extend ) { 99 new_object_block = _Workspace_Allocate( block_size ); At conditional (4): "new_object_block == 0" taking false path 100 if ( !new_object_block ) 101 return; 102 } else { 103 new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 104 } 105 106 /* 107 * If the index_base is the maximum we need to grow the tables. 108 */ At conditional (5): "index_base >= (information)->maximum" taking false path 109 if (index_base >= information->maximum ) { 110 ISR_Level level; 111 void **object_blocks; 112 uint32_t *inactive_per_block; 113 Objects_Control **local_table; 114 void *old_tables; 115 size_t block_size; 116 117 /* 118 * Growing the tables means allocating a new area, doing a copy and 119 * updating the information table. 120 * 121 * If the maximum is minimum we do not have a table to copy. First 122 * time through. 123 * 124 * The allocation has : 125 * 126 * void *objects[block_count]; 127 * uint32_t inactive_count[block_count]; 128 * Objects_Control *local_table[maximum]; 129 * 130 * This is the order in memory. Watch changing the order. See the memcpy 131 * below. 132 */ 133 134 /* 135 * Up the block count and maximum 136 */ 137 block_count++; 138 139 /* 140 * Allocate the tables and break it up. 141 */ 142 block_size = block_count * 143 (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + 144 ((maximum + minimum_index) * sizeof(Objects_Control *)); 145 object_blocks = (void**) _Workspace_Allocate( block_size ); 146 147 if ( !object_blocks ) { 148 _Workspace_Free( new_object_block ); 149 return; 150 } 151 152 /* 153 * Break the block into the various sections. 154 */ 155 inactive_per_block = (uint32_t *) _Addresses_Add_offset( 156 object_blocks, block_count * sizeof(void*) ); 157 local_table = (Objects_Control **) _Addresses_Add_offset( 158 inactive_per_block, block_count * sizeof(uint32_t) ); 159 160 /* 161 * Take the block count down. Saves all the (block_count - 1) 162 * in the copies. 163 */ 164 block_count--; 165 166 if ( information->maximum > minimum_index ) { 167 168 /* 169 * Copy each section of the table over. This has to be performed as 170 * separate parts as size of each block has changed. 171 */ 172 173 memcpy( object_blocks, 174 information->object_blocks, 175 block_count * sizeof(void*) ); 176 memcpy( inactive_per_block, 177 information->inactive_per_block, 178 block_count * sizeof(uint32_t) ); 179 memcpy( local_table, 180 information->local_table, 181 (information->maximum + minimum_index) * sizeof(Objects_Control *) ); 182 } else { 183 184 /* 185 * Deal with the special case of the 0 to minimum_index 186 */ 187 for ( index = 0; index < minimum_index; index++ ) { 188 local_table[ index ] = NULL; 189 } 190 } 191 192 /* 193 * Initialise the new entries in the table. 194 */ 195 object_blocks[block_count] = NULL; 196 inactive_per_block[block_count] = 0; 197 198 for ( index=index_base ; 199 index < ( information->allocation_size + index_base ); 200 index++ ) { 201 local_table[ index ] = NULL; 202 } 203 204 _ISR_Disable( level ); 205 206 old_tables = information->object_blocks; 207 208 information->object_blocks = object_blocks; 209 information->inactive_per_block = inactive_per_block; 210 information->local_table = local_table; 211 information->maximum = (Objects_Maximum) maximum; 212 information->maximum_id = _Objects_Build_id( 213 information->the_api, 214 information->the_class, 215 _Objects_Local_node, 216 information->maximum 217 ); 218 219 _ISR_Enable( level ); 220 221 if ( old_tables ) 222 _Workspace_Free( old_tables ); 223 224 block_count++; 225 } 226 227 /* 228 * Assign the new object block to the object block table. 229 */ Event var_deref_op: Variable "(information)->object_blocks" tracked as NULL was dereferenced. Also see events: [var_compare_op] 230 information->object_blocks[ block ] = new_object_block; 231