File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88#include <sys/types.h>
99#include <unistd.h>
1010#include <mpi.h>
11+ #include <stdint.h>
1112
1213size_t get_message_size () {
1314 return (sizeof (unsigned short ) * 3 + 2 * sizeof (size_t ) + sizeof (enum operation ));
@@ -107,7 +108,7 @@ size_t alloc_memory(size_t size, struct leader_resources *l_r) {
107108 struct allocation * a = malloc (32 + sizeof (struct allocation ));
108109 a -> number_parts = 0 ;
109110 a -> parts = NULL ;
110- a -> v_address_start = 99999999999 ;
111+ a -> v_address_start = SIZE_MAX ;
111112 ssize_t m_size = size ;
112113 for (size_t i = 0 ; i < blks -> nb_blocks ; i ++ ) {
113114 struct block * b = blks -> blks [i ];
@@ -118,7 +119,7 @@ size_t alloc_memory(size_t size, struct leader_resources *l_r) {
118119 if (m_size < 0 ) {
119120 b = split_block_u (b , -1 * m_size );
120121 }
121- if (a -> v_address_start == 99999999999 )
122+ if (a -> v_address_start == SIZE_MAX )
122123 a -> v_address_start = b -> virtual_address ;
123124 a -> number_parts ++ ;
124125 a -> parts = realloc (a -> parts , 34 + (a -> number_parts * sizeof (struct allocation * )));
@@ -131,7 +132,7 @@ size_t alloc_memory(size_t size, struct leader_resources *l_r) {
131132 return a -> v_address_start ;
132133 }
133134 }
134- return 99999999999 ;
135+ return SIZE_MAX ;
135136}
136137
137138struct address_search * search_at_address (size_t address , struct leader_resources * l_r ) {
You can’t perform that action at this time.
0 commit comments