1 /* mm_diff - Memory snapshooting and comparison */
3 /* Copyright (c) 2008-2012. The SimGrid Team. All rights reserved. */
5 /* This program is free software; you can redistribute it and/or modify it
6 * under the terms of the license (GNU LGPL) which comes with this package. */
8 #include "xbt/ex_interface.h" /* internals of backtrace setup */
12 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mm_diff, xbt,
13 "Logging specific to mm_diff in mmalloc");
15 extern char *xbt_binary_name;
17 void mmalloc_backtrace_block_display(xbt_mheap_t heap, size_t block){
22 type = heap->heapinfo[block].type;
25 fprintf(stderr,"Only full blocks are backtraced for now. Ignoring your request.\n");
28 if (heap->heapinfo[block].busy_block.bt_size == 0) {
29 fprintf(stderr,"No backtrace available for that block, sorry.\n");
33 memcpy(&e.bt,&(heap->heapinfo[block].busy_block.bt),sizeof(void*)*XBT_BACKTRACE_SIZE);
34 e.used = heap->heapinfo[block].busy_block.bt_size;
36 xbt_ex_setup_backtrace(&e);
38 fprintf(stderr, "(backtrace not set)\n");
39 } else if (e.bt_strings == NULL) {
40 fprintf(stderr, "(backtrace not ready to be computed. %s)\n",xbt_binary_name?"Dunno why":"xbt_binary_name not setup yet");
44 fprintf(stderr, "Backtrace of where the block %zu was malloced (%d frames):\n", block ,e.used);
45 for (i = 0; i < e.used; i++) /* no need to display "xbt_backtrace_display" */{
46 fprintf(stderr,"%d",i);fflush(NULL);
47 fprintf(stderr, "---> %s\n", e.bt_strings[i] + 4);
52 void mmalloc_backtrace_fragment_display(xbt_mheap_t mdp, size_t block, size_t frag){
56 memcpy(&e.bt,&(mdp->heapinfo[block].busy_frag.bt[frag]),sizeof(void*)*XBT_BACKTRACE_SIZE);
57 e.used = XBT_BACKTRACE_SIZE;
59 xbt_ex_setup_backtrace(&e);
61 fprintf(stderr, "(backtrace not set)\n");
62 } else if (e.bt_strings == NULL) {
63 fprintf(stderr, "(backtrace not ready to be computed. %s)\n",xbt_binary_name?"Dunno why":"xbt_binary_name not setup yet");
67 fprintf(stderr, "Backtrace of where the fragment %zu in block %zu was malloced (%d frames):\n", frag, block ,e.used);
68 for (i = 0; i < e.used; i++) /* no need to display "xbt_backtrace_display" */{
69 fprintf(stderr,"%d",i);fflush(NULL);
70 fprintf(stderr, "---> %s\n", e.bt_strings[i] + 4);
75 int mmalloc_compare_heap(xbt_mheap_t mdp1, xbt_mheap_t mdp2){
77 if(mdp1 == NULL && mdp2 == NULL){
78 fprintf(stderr, "Malloc descriptors null\n");
82 int errors = mmalloc_compare_mdesc(mdp1, mdp2);
88 int mmalloc_compare_mdesc(struct mdesc *mdp1, struct mdesc *mdp2){
92 if(mdp1->heaplimit != mdp2->heaplimit){
93 fprintf(stderr,"Different limit of valid info table indices\n");
97 void* s_heap = (char *)mmalloc_get_current_heap() - STD_HEAP_SIZE - getpagesize();
99 void *heapbase1 = (char *)mdp1 + BLOCKSIZE;
100 void *heapbase2 = (char *)mdp2 + BLOCKSIZE;
103 void *addr_block1 = NULL, *addr_block2 = NULL, *addr_frag1 = NULL, *addr_frag2 = NULL;
110 int total_distance = 0;
113 void *address_pointed1 = NULL, *address_pointed2 = NULL;
115 int block_pointed1, block_pointed2, frag_pointed1, frag_pointed2;
116 void *addr_block_pointed1 = NULL, *addr_block_pointed2 = NULL, *addr_frag_pointed1 = NULL, *addr_frag_pointed2 = NULL;
118 /* Check busy blocks*/
120 while(i < mdp1->heaplimit){
122 if(mdp1->heapinfo[i].type != mdp2->heapinfo[i].type){
123 fprintf(stderr,"Different type of block : %d - %d\n", mdp1->heapinfo[i].type, mdp2->heapinfo[i].type);
127 /* Get address of block i in each heap */
128 addr_block1 = ((void*) (((ADDR2UINT(i)) - 1) * BLOCKSIZE + (char*)heapbase1));
129 addr_block2 = ((void*) (((ADDR2UINT(i)) - 1) * BLOCKSIZE + (char*)heapbase2));
131 if(mdp1->heapinfo[i].type == 0){ /* busy large block */
133 if(mdp1->heapinfo[i].busy_block.size != mdp2->heapinfo[i].busy_block.size){
134 fprintf(stderr,"Different size of a large cluster : %zu - %zu\n", mdp1->heapinfo[i].busy_block.size, mdp2->heapinfo[i].busy_block.size);
139 if(mdp1->heapinfo[i].busy_block.busy_size != mdp2->heapinfo[i].busy_block.busy_size){
140 fprintf(stderr,"Different busy_size of a large cluster : %zu - %zu\n", mdp1->heapinfo[i].busy_block.busy_size, mdp2->heapinfo[i].busy_block.busy_size);
145 /* Hamming distance on different blocks */
149 for(k=0;k<mdp1->heapinfo[i].busy_block.busy_size;k++){
151 if(memcmp(((char *)addr_block1) + k, ((char *)addr_block2) + k, 1) != 0){
153 fprintf(stderr, "Different byte (offset=%d) (%p - %p) in block %zu\n", k, (char *)addr_block1 + k, (char *)addr_block2 + k, i); fflush(NULL);
155 /* Check if pointer difference */
156 pointer_align = (k >> sizeof(void*)) * sizeof(void*);
157 address_pointed1 = *((void **)((char *)addr_block1 + pointer_align));
158 address_pointed2 = *((void **)((char *)addr_block2 + pointer_align));
160 fprintf(stderr, "Addresses pointed : %p - %p\n", address_pointed1, address_pointed2);
162 block_pointed1 = ((char*)address_pointed1 - (char*)((struct mdesc*)s_heap)->heapbase) / BLOCKSIZE + 1;
163 block_pointed2 = ((char*)address_pointed2 - (char*)((struct mdesc*)s_heap)->heapbase) / BLOCKSIZE + 1;
165 fprintf(stderr, "Blocks pointed : %d - %d\n", block_pointed1, block_pointed2);
167 if((char *) address_pointed1 < (char*)((struct mdesc*)s_heap)->heapbase || block_pointed1 > mdp1->heapsize || block_pointed1 < 1 || (char *) address_pointed2 < (char*)((struct mdesc*)s_heap)->heapbase || block_pointed2 > mdp2->heapsize || block_pointed2 < 1) {
168 fprintf(stderr, "Unknown pointer(s) ! \n");
174 /*if(((char *) address_pointed1 > (char*)((struct mdesc*)s_heap)->heapbase) && (block_pointed1 < mdp1->heapsize) && (block_pointed1 >= 1)){
175 addr_block_pointed1 = ((void*) (((ADDR2UINT((size_t)block_pointed1)) - 1) * BLOCKSIZE + (char*)heapbase1));
176 if(((char *) address_pointed2 > (char*)((struct mdesc*)s_heap)->heapbase) && (block_pointed2 < mdp2->heapsize) && (block_pointed2 >= 1)){
177 addr_block_pointed2 = ((void*) (((ADDR2UINT((size_t)block_pointed2)) - 1) * BLOCKSIZE + (char*)heapbase2));
179 addr_block_pointed2 = addr_block2;
183 addr_block_pointed1 = addr_block1;
185 if(((char *) address_pointed2 > (char*)((struct mdesc*)s_heap)->heapbase) && (block_pointed2 < mdp2->heapsize) && (block_pointed2 >= 1)){
186 addr_block_pointed2 = ((void*) (((ADDR2UINT((size_t)block_pointed2)) - 1) * BLOCKSIZE + (char*)heapbase2));
188 fprintf(stderr, "Unknown pointers ! \n");
195 addr_block_pointed1 = ((void*) (((ADDR2UINT((size_t)block_pointed1)) - 1) * BLOCKSIZE + (char*)heapbase1));
196 addr_block_pointed2 = ((void*) (((ADDR2UINT((size_t)block_pointed2)) - 1) * BLOCKSIZE + (char*)heapbase2));
198 if(mdp1->heapinfo[block_pointed1].type == mdp2->heapinfo[block_pointed2].type){
200 if(mdp1->heapinfo[block_pointed1].type == 0){ // Large block
202 if(mdp1->heapinfo[block_pointed1].busy_block.busy_size == mdp2->heapinfo[block_pointed2].busy_block.busy_size){
204 if(memcmp(addr_block_pointed1, addr_block_pointed2, mdp1->heapinfo[block_pointed1].busy_block.busy_size) != 0){
207 fprintf(stderr, "False difference detected\n");
214 }else{ // Fragmented block
217 frag_pointed1 = ((uintptr_t) (ADDR2UINT (address_pointed1) % (BLOCKSIZE))) >> mdp1->heapinfo[block_pointed1].type;
218 frag_pointed2 = ((uintptr_t) (ADDR2UINT (address_pointed2) % (BLOCKSIZE))) >> mdp2->heapinfo[block_pointed2].type;
220 fprintf(stderr, "Fragments pointed : %d - %d\n", frag_pointed1, frag_pointed2);
222 if((frag_pointed1 < 0) || (frag_pointed1 > (BLOCKSIZE / pow( 2, mdp1->heapinfo[block_pointed1].type))) || (frag_pointed2 < 0) || (frag_pointed2 > (BLOCKSIZE / pow( 2, mdp2->heapinfo[block_pointed2].type)))){
223 fprintf(stderr, "Unknown pointer(s) ! \n");
229 fprintf(stderr, "Size used in fragments pointed : %d - %d\n", mdp1->heapinfo[block_pointed1].busy_frag.frag_size[frag_pointed1], mdp2->heapinfo[block_pointed2].busy_frag.frag_size[frag_pointed2]);
231 if(mdp1->heapinfo[block_pointed1].busy_frag.frag_size[frag_pointed1] == mdp2->heapinfo[block_pointed2].busy_frag.frag_size[frag_pointed2]){
233 addr_frag_pointed1 = (char *)addr_block_pointed1 + (frag_pointed1 * (int)pow(2, mdp1->heapinfo[block_pointed1].type));
234 addr_frag_pointed2 = (char *)addr_block_pointed2 + (frag_pointed2 * (int)pow(2, mdp2->heapinfo[block_pointed2].type));
236 if(memcmp(addr_frag_pointed1, addr_frag_pointed2, mdp1->heapinfo[block_pointed1].busy_frag.frag_size[frag_pointed1]) != 0){
239 fprintf(stderr, "False difference detected\n");
249 if(((mdp1->heapinfo[block_pointed1].type == 0) && (mdp2->heapinfo[block_pointed2].type != 0)) || ((mdp1->heapinfo[block_pointed1].type != 0) && (mdp2->heapinfo[block_pointed2].type == 0))){
250 fprintf(stderr, "Pointers on blocks with different types \n");
254 frag_pointed1 = ((uintptr_t) (ADDR2UINT (address_pointed1) % (BLOCKSIZE))) >> mdp1->heapinfo[block_pointed1].type;
255 frag_pointed2 = ((uintptr_t) (ADDR2UINT (address_pointed2) % (BLOCKSIZE))) >> mdp2->heapinfo[block_pointed2].type;
257 fprintf(stderr, "Fragments pointed : %d - %d\n", frag_pointed1, frag_pointed2);
259 if((frag_pointed1 < 0) || (frag_pointed1 > (BLOCKSIZE / pow( 2, mdp1->heapinfo[block_pointed1].type))) || (frag_pointed2 < 0) || (frag_pointed2 > (BLOCKSIZE / pow( 2, mdp2->heapinfo[block_pointed2].type)))){
260 fprintf(stderr, "Unknown pointer(s) ! \n");
266 fprintf(stderr, "Size used in fragments pointed : %d - %d\n", mdp1->heapinfo[block_pointed1].busy_frag.frag_size[frag_pointed1], mdp2->heapinfo[block_pointed2].busy_frag.frag_size[frag_pointed2]);
268 if(mdp1->heapinfo[block_pointed1].busy_frag.frag_size[frag_pointed1] == mdp2->heapinfo[block_pointed2].busy_frag.frag_size[frag_pointed2]){
270 addr_frag_pointed1 = (char *)addr_block_pointed1 + (frag_pointed1 * (int)pow(2, mdp1->heapinfo[block_pointed1].type));
271 addr_frag_pointed2 = (char *)addr_block_pointed2 + (frag_pointed2 * (int)pow(2, mdp2->heapinfo[block_pointed2].type));
273 if(memcmp(addr_frag_pointed1, addr_frag_pointed2, mdp1->heapinfo[block_pointed1].busy_frag.frag_size[frag_pointed1]) != 0){
276 fprintf(stderr, "False difference detected\n");
290 fprintf(stderr,"\nDifferent data in large block %zu (size = %zu (in blocks), busy_size = %zu (in bytes))\n", i, mdp1->heapinfo[i].busy_block.size, mdp1->heapinfo[i].busy_block.busy_size);
292 fprintf(stderr, "Hamming distance between blocks : %d\n", distance);
293 mmalloc_backtrace_block_display(mdp1, i);
294 mmalloc_backtrace_block_display(mdp2, i);
295 fprintf(stderr, "\n");
297 total_distance += distance;
304 if(mdp1->heapinfo[i].type > 0){ /* busy fragmented block */
306 if(mdp1->heapinfo[i].type != mdp2->heapinfo[i].type){
307 fprintf(stderr,"Different size of fragments in fragmented block %zu : %d - %d\n", i, mdp1->heapinfo[i].type, mdp2->heapinfo[i].type); fflush(NULL);
311 if(mdp1->heapinfo[i].busy_frag.nfree != mdp2->heapinfo[i].busy_frag.nfree){
312 fprintf(stderr,"Different free fragments in fragmented block %zu : %zu - %zu\n", i, mdp1->heapinfo[i].busy_frag.nfree, mdp2->heapinfo[i].busy_frag.nfree); fflush(NULL);
316 if(mdp1->heapinfo[i].busy_frag.first != mdp2->heapinfo[i].busy_frag.first){
317 fprintf(stderr,"Different busy_size of a large cluster : %zu - %zu\n", mdp1->heapinfo[i].busy_block.busy_size, mdp2->heapinfo[i].busy_block.busy_size); fflush(NULL);
321 frag_size = pow(2, mdp1->heapinfo[i].type);
323 for(j=0; j< (BLOCKSIZE/frag_size); j++){
325 if(mdp1->heapinfo[i].busy_frag.frag_size[j] != mdp2->heapinfo[i].busy_frag.frag_size[j]){
326 fprintf(stderr,"Different busy_size for fragment %zu in block %zu : %hu - %hu\n", j, i, mdp1->heapinfo[i].busy_frag.frag_size[j], mdp2->heapinfo[i].busy_frag.frag_size[j]); fflush(NULL);
330 if(mdp1->heapinfo[i].busy_frag.frag_size[j] > 0){
332 addr_frag1 = (char *)addr_block1 + (j * frag_size);
333 addr_frag2 = (char *)addr_block2 + (j * frag_size);
335 /* Hamming distance on different blocks */
338 for(k=0;k<mdp1->heapinfo[i].busy_frag.frag_size[j];k++){
340 if(memcmp(((char *)addr_frag1) + k, ((char *)addr_frag2) + k, 1) != 0){
342 fprintf(stderr, "Different byte (offset=%d) (%p - %p) in fragment %zu in block %zu\n", k, (char *)addr_frag1 + k, (char *)addr_frag2 + k, j, i); fflush(NULL);
344 pointer_align = (k / sizeof(void*)) * sizeof(void*);
345 address_pointed1 = *((void **)((char *)addr_frag1 + pointer_align));
346 address_pointed2 = *((void **)((char *)addr_frag2 + pointer_align));
348 fprintf(stderr, "Addresses pointed : %p - %p\n", address_pointed1, address_pointed2);
350 block_pointed1 = ((char*)address_pointed1 - (char*)((struct mdesc*)s_heap)->heapbase) / BLOCKSIZE + 1;
351 block_pointed2 = ((char*)address_pointed2 - (char*)((struct mdesc*)s_heap)->heapbase) / BLOCKSIZE + 1;
353 fprintf(stderr, "Blocks pointed : %d - %d\n", block_pointed1, block_pointed2);
355 if((char *) address_pointed1 < (char*)((struct mdesc*)s_heap)->heapbase || block_pointed1 > mdp1->heapsize || block_pointed1 < 1 || (char *) address_pointed2 < (char*)((struct mdesc*)s_heap)->heapbase || block_pointed2 > mdp2->heapsize || block_pointed2 < 1) {
356 fprintf(stderr, "Unknown pointer ! \n");
362 /*if(((char *) address_pointed1 > (char*)((struct mdesc*)s_heap)->heapbase) && (block_pointed1 < mdp1->heapsize) && (block_pointed1 >= 1)){
363 addr_block_pointed1 = ((void*) (((ADDR2UINT((size_t)block_pointed1)) - 1) * BLOCKSIZE + (char*)heapbase1));
365 if(((char *) address_pointed2 > (char*)((struct mdesc*)s_heap)->heapbase) && (block_pointed2 < mdp2->heapsize) && (block_pointed2 >= 1)){
366 addr_block_pointed2 = ((void*) (((ADDR2UINT((size_t)block_pointed2)) - 1) * BLOCKSIZE + (char*)heapbase2));
370 addr_block_pointed2 = addr_block2;
374 addr_block_pointed1 = addr_block1;
377 if(((char *) address_pointed2 > (char*)((struct mdesc*)s_heap)->heapbase) && (block_pointed2 < mdp2->heapsize) && (block_pointed2 >= 1)){
378 addr_block_pointed2 = ((void*) (((ADDR2UINT((size_t)block_pointed2)) - 1) * BLOCKSIZE + (char*)heapbase2));
381 fprintf(stderr, "Unknown pointers ! \n");
388 addr_block_pointed1 = ((void*) (((ADDR2UINT((size_t)block_pointed1)) - 1) * BLOCKSIZE + (char*)heapbase1));
389 addr_block_pointed2 = ((void*) (((ADDR2UINT((size_t)block_pointed2)) - 1) * BLOCKSIZE + (char*)heapbase2));
391 if(mdp1->heapinfo[block_pointed1].type == mdp2->heapinfo[block_pointed2].type){
393 if(mdp1->heapinfo[block_pointed1].type == 0){ // Large block
395 if(mdp1->heapinfo[block_pointed1].busy_block.busy_size == mdp2->heapinfo[block_pointed2].busy_block.busy_size){
397 if(memcmp(addr_block_pointed1, addr_block_pointed2, mdp1->heapinfo[block_pointed1].busy_block.busy_size) != 0){
400 fprintf(stderr, "False difference detected\n");
407 }else{ // Fragmented block
410 frag_pointed1 = ((uintptr_t) (ADDR2UINT (address_pointed1) % (BLOCKSIZE))) >> mdp1->heapinfo[block_pointed1].type;
411 frag_pointed2 = ((uintptr_t) (ADDR2UINT (address_pointed2) % (BLOCKSIZE))) >> mdp2->heapinfo[block_pointed2].type;
413 fprintf(stderr, "Fragments pointed : %d - %d\n", frag_pointed1, frag_pointed2);
415 if((frag_pointed1 < 0) || (frag_pointed1 > (BLOCKSIZE / pow( 2, mdp1->heapinfo[block_pointed1].type))) || (frag_pointed2 < 0) || (frag_pointed2 > (BLOCKSIZE / pow( 2, mdp2->heapinfo[block_pointed2].type)))){
416 fprintf(stderr, "Unknown pointer ! \n");
422 fprintf(stderr, "Size used in fragments pointed : %d - %d\n", mdp1->heapinfo[block_pointed1].busy_frag.frag_size[frag_pointed1], mdp2->heapinfo[block_pointed2].busy_frag.frag_size[frag_pointed2]);
424 if(mdp1->heapinfo[block_pointed1].busy_frag.frag_size[frag_pointed1] == mdp2->heapinfo[block_pointed2].busy_frag.frag_size[frag_pointed2]){
426 addr_frag_pointed1 = (char *)addr_block_pointed1 + (frag_pointed1 * (int)pow(2, mdp1->heapinfo[block_pointed1].type));
427 addr_frag_pointed2 = (char *)addr_block_pointed2 + (frag_pointed2 * (int)pow(2, mdp2->heapinfo[block_pointed2].type));
429 if(memcmp(addr_frag_pointed1, addr_frag_pointed2, mdp1->heapinfo[block_pointed1].busy_frag.frag_size[frag_pointed1]) != 0){
432 fprintf(stderr, "False difference detected\n");
442 if(((mdp1->heapinfo[block_pointed1].type == 0) && (mdp2->heapinfo[block_pointed2].type != 0)) || ((mdp1->heapinfo[block_pointed1].type != 0) && (mdp2->heapinfo[block_pointed2].type == 0))){
443 fprintf(stderr, "Pointers on blocks with different types \n");
447 frag_pointed1 = ((uintptr_t) (ADDR2UINT (address_pointed1) % (BLOCKSIZE))) >> mdp1->heapinfo[block_pointed1].type;
448 frag_pointed2 = ((uintptr_t) (ADDR2UINT (address_pointed2) % (BLOCKSIZE))) >> mdp2->heapinfo[block_pointed2].type;
450 fprintf(stderr, "Fragments pointed : %d - %d\n", frag_pointed1, frag_pointed2);
452 if((frag_pointed1 < 0) || (frag_pointed1 > (BLOCKSIZE / pow( 2, mdp1->heapinfo[block_pointed1].type))) || (frag_pointed2 < 0) || (frag_pointed2 > (BLOCKSIZE / pow( 2, mdp2->heapinfo[block_pointed2].type)))){
453 fprintf(stderr, "Unknown pointers ! \n");
459 fprintf(stderr, "Size used in fragments pointed : %d - %d\n", mdp1->heapinfo[block_pointed1].busy_frag.frag_size[frag_pointed1], mdp2->heapinfo[block_pointed2].busy_frag.frag_size[frag_pointed2]);
461 if(mdp1->heapinfo[block_pointed1].busy_frag.frag_size[frag_pointed1] == mdp2->heapinfo[block_pointed2].busy_frag.frag_size[frag_pointed2]){
463 addr_frag_pointed1 = (char *)addr_block_pointed1 + (frag_pointed1 * (int)pow(2, mdp1->heapinfo[block_pointed1].type));
464 addr_frag_pointed2 = (char *)addr_block_pointed2 + (frag_pointed2 * (int)pow(2, mdp2->heapinfo[block_pointed2].type));
466 if(memcmp(addr_frag_pointed1, addr_frag_pointed2, mdp1->heapinfo[block_pointed1].busy_frag.frag_size[frag_pointed1]) != 0){
469 fprintf(stderr, "False difference detected\n");
483 fprintf(stderr,"\nDifferent data in fragment %zu (size = %zu, size used = %hu) in block %zu \n", j, frag_size, mdp1->heapinfo[i].busy_frag.frag_size[j], i);
484 fprintf(stderr, "Hamming distance between fragments : %d\n", distance);
485 mmalloc_backtrace_fragment_display(mdp1, i, j);
486 mmalloc_backtrace_fragment_display(mdp2, i, j);
487 fprintf(stderr, "\n");
489 total_distance += distance;
498 }else{ /* free block */
509 fprintf(stderr, "Hamming distance between heap regions : %d\n", total_distance);
515 /* void *get_end_addr_heap(void *heap){ */
517 /* FILE *fp; /\* File pointer to process's proc maps file *\/ */
518 /* char *line = NULL; /\* Temporal storage for each line that is readed *\/ */
519 /* ssize_t read; /\* Number of bytes readed *\/ */
520 /* size_t n = 0; /\* Amount of bytes to read by getline *\/ */
522 /* fp = fopen("/proc/self/maps", "r"); */
525 /* perror("fopen failed"); */
528 /* xbt_dynar_t lfields = NULL; */
529 /* xbt_dynar_t start_end = NULL; */
530 /* void *start_addr; */
531 /* void *end_addr; */
533 /* while ((read = getline(&line, &n, fp)) != -1) { */
535 /* xbt_str_trim(line, NULL); */
536 /* xbt_str_strip_spaces(line); */
537 /* lfields = xbt_str_split(line,NULL); */
539 /* start_end = xbt_str_split(xbt_dynar_get_as(lfields, 0, char*), "-"); */
540 /* start_addr = (void *) strtoul(xbt_dynar_get_as(start_end, 0, char*), NULL, 16); */
541 /* end_addr = (void *) strtoul(xbt_dynar_get_as(start_end, 1, char*), NULL, 16); */
543 /* if(start_addr == heap){ */
546 /* xbt_dynar_reset(lfields); */
547 /* xbt_free(lfields); */
548 /* xbt_dynar_reset(start_end); */
549 /* xbt_free(start_end); */
550 /* return end_addr; */
555 /* xbt_dynar_reset(lfields); */
556 /* xbt_free(lfields); */
557 /* xbt_dynar_reset(start_end); */
558 /* xbt_free(start_end); */