Mercurial > cgi-bin > hgwebdir.cgi > VMS > C_Libraries > ListOfArrays
comparison ListOfArrays.h @ 13:7128ffdcc797
have allocation in coreloop use VMS_WL__malloc
| author | Nina Engelhardt <nengel@mailbox.tu-berlin.de> |
|---|---|
| date | Mon, 29 Oct 2012 16:53:01 +0100 |
| parents | abf2117d7535 |
| children |
comparison
equal
deleted
inserted
replaced
| 8:81f3c9cbb078 | 9:954f0472742d |
|---|---|
| 35 } while (0) | 35 } while (0) |
| 36 | 36 |
| 37 #define addToListOfArrays_ext(type,value,list) do { \ | 37 #define addToListOfArrays_ext(type,value,list) do { \ |
| 38 int offset_in_fragment = list->next_free_index % list->num_entries_per_fragment; \ | 38 int offset_in_fragment = list->next_free_index % list->num_entries_per_fragment; \ |
| 39 if(offset_in_fragment == 0 && (list->next_free_index / list->num_entries_per_fragment) >= list->dim1info->numInArray){ \ | 39 if(offset_in_fragment == 0 && (list->next_free_index / list->num_entries_per_fragment) >= list->dim1info->numInArray){ \ |
| 40 void* newBlock = malloc(list->entry_size * list->num_entries_per_fragment); \ | 40 void* newBlock = VMS_WL__malloc(list->entry_size * list->num_entries_per_fragment); \ |
| 41 addToDynArray(newBlock,list->dim1info); \ | 41 addToDynArray(newBlock,list->dim1info); \ |
| 42 } \ | 42 } \ |
| 43 type* typedFragment = (type*) ((list->dim1)[list->dim1info->numInArray -1]); \ | 43 type* typedFragment = (type*) ((list->dim1)[list->dim1info->numInArray -1]); \ |
| 44 typedFragment[offset_in_fragment] = value; \ | 44 typedFragment[offset_in_fragment] = value; \ |
| 45 list->next_free_index++; \ | 45 list->next_free_index++; \ |
