6 void *ptr = malloc(sz);
9 printf (
"Error: can't allocate %d bytes\n", sz);
13 printf(
"allocating %d bytes to %p\n", sz, ptr);
23 r = ((high-low)*
drand48()) + low;
32 return ((high-low)*
drand48()) + low;
52 while (*str >=
'0' && *str <=
'9'){
53 v = v*10 + *str -
'0'; str++;
56 if (*str ==
'm' || *str ==
'M'){
59 else if (*str ==
'k' || *str ==
'K'){
int random_integer(int low, int high)
double random_double(double low, double high)
int str_to_mem_unit(char *str)