comparison src/mc-alloc.c @ 5334:b249c479f9e1

Replace some C++ comments with C89-style /* */ comments, mc-alloc.c 2011-01-10 Aidan Kehoe <kehoea@parhasard.net> * mc-alloc.c (get_used_list_index): Replace some C++ comments with C-style /* comments.
author Aidan Kehoe <kehoea@parhasard.net>
date Mon, 10 Jan 2011 20:00:57 +0000
parents 2cc24c69446c
children 22c4e67a2e69 7ebbe334061e
comparison
equal deleted inserted replaced
5333:aa2705c83c24 5334:b249c479f9e1
1146 static int 1146 static int
1147 get_used_list_index (size_t size) 1147 get_used_list_index (size_t size)
1148 { 1148 {
1149 if (size <= USED_LIST_MIN_OBJECT_SIZE) 1149 if (size <= USED_LIST_MIN_OBJECT_SIZE)
1150 { 1150 {
1151 // printf ("size %d -> index %d\n", size, 0); 1151 /* printf ("size %d -> index %d\n", size, 0); */
1152 return 0; 1152 return 0;
1153 } 1153 }
1154 if (size <= (size_t) USED_LIST_UPPER_THRESHOLD) 1154 if (size <= (size_t) USED_LIST_UPPER_THRESHOLD)
1155 { 1155 {
1156 // printf ("size %d -> index %d\n", size, 1156 /* printf ("size %d -> index %d\n", size, */
1157 // ((size - USED_LIST_MIN_OBJECT_SIZE - 1) 1157 /* ((size - USED_LIST_MIN_OBJECT_SIZE - 1) */
1158 // / USED_LIST_LIN_STEP) + 1); 1158 /* / USED_LIST_LIN_STEP) + 1); */
1159 return ((size - USED_LIST_MIN_OBJECT_SIZE - 1) 1159 return ((size - USED_LIST_MIN_OBJECT_SIZE - 1)
1160 / USED_LIST_LIN_STEP) + 1; 1160 / USED_LIST_LIN_STEP) + 1;
1161 } 1161 }
1162 // printf ("size %d -> index %d\n", size, N_USED_PAGE_LISTS - 1); 1162 /* printf ("size %d -> index %d\n", size, N_USED_PAGE_LISTS - 1); */
1163 return N_USED_PAGE_LISTS - 1; 1163 return N_USED_PAGE_LISTS - 1;
1164 } 1164 }
1165 1165
1166 /* Returns the size of the used heap list according to given index. */ 1166 /* Returns the size of the used heap list according to given index. */
1167 static size_t 1167 static size_t