@@ -47,7 +47,7 @@ size_t alloc_memory(size_t size, struct leader_resources *l_r) {
4747 if (0 == b -> free && b -> id != l_r -> id && !is_in_dead_list (l_r , b -> id )) {
4848 if (size == b -> size ) {
4949 b -> free = 1 ;
50- struct allocation * a = malloc (32 + sizeof (struct allocation ));
50+ struct allocation * a = malloc (60 + sizeof (struct allocation ));
5151 a -> number_parts = 1 ;
5252 a -> v_address_start = b -> virtual_address ;
5353 a -> parts = malloc (34 + (a -> number_parts * sizeof (struct allocation * )));
@@ -59,7 +59,7 @@ size_t alloc_memory(size_t size, struct leader_resources *l_r) {
5959 b -> free = 1 ;
6060 b = split_block_u (b , size );
6161 if (b ) {
62- struct allocation * a = malloc (32 + sizeof (struct allocation ));
62+ struct allocation * a = malloc (60 + sizeof (struct allocation ));
6363 a -> number_parts = 1 ;
6464 a -> v_address_start = b -> virtual_address ;
6565 a -> parts = malloc (34 + (a -> number_parts * sizeof (struct allocation * )));
@@ -76,7 +76,7 @@ size_t alloc_memory(size_t size, struct leader_resources *l_r) {
7676 }
7777 }
7878 // Multi - Parts
79- struct allocation * a = malloc (32 + sizeof (struct allocation ));
79+ struct allocation * a = malloc (60 + sizeof (struct allocation ));
8080 a -> number_parts = 0 ;
8181 a -> parts = NULL ;
8282 a -> v_address_start = SIZE_MAX ;
@@ -98,7 +98,7 @@ size_t alloc_memory(size_t size, struct leader_resources *l_r) {
9898 if (a -> v_address_start == SIZE_MAX )
9999 a -> v_address_start = b -> virtual_address ;
100100 a -> number_parts ++ ;
101- a -> parts = realloc (a -> parts , 34 + ( a -> number_parts * sizeof (struct allocation * ) ));
101+ a -> parts = realloc (a -> parts , ( 4 + a -> number_parts ) * sizeof (struct allocation * ));
102102 a -> parts [a -> number_parts - 1 ] = b ;
103103 }
104104 b = b -> next ;
0 commit comments