
324: does it sound strange?
look at this code:
net=(struct s_net *) realloc(net, new_dimension * sizeof(struct
s_net));
block=(struct s_block *) realloc(block, new_dimension * sizeof(struct
s_block));
s_net is defined as:
struct s_net {char *name; int num_pins; int *blocks; int *blk_pin; };
s_block is defined as:
struct s_block {char *name; enum e_block_types type; int *nets; int x;
int y; boolean combinatorial;};
after the realloc the element number 324 of the two arrays is lost.
can somebody explain what happens?
thanks