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){
21 if (heap->heapinfo[block].busy_block.bt_size == 0) {
22 fprintf(stderr,"No backtrace available for that block, sorry.\n");
26 memcpy(&e.bt,&(heap->heapinfo[block].busy_block.bt),sizeof(void*)*XBT_BACKTRACE_SIZE);
27 e.used = heap->heapinfo[block].busy_block.bt_size;
29 xbt_ex_setup_backtrace(&e);
31 fprintf(stderr, "(backtrace not set)\n");
32 } else if (e.bt_strings == NULL) {
33 fprintf(stderr, "(backtrace not ready to be computed. %s)\n",xbt_binary_name?"Dunno why":"xbt_binary_name not setup yet");
37 fprintf(stderr, "Backtrace of where the block %zu was malloced (%d frames):\n", block ,e.used);
38 for (i = 0; i < e.used; i++) /* no need to display "xbt_backtrace_display" */{
39 fprintf(stderr,"%d",i);fflush(NULL);
40 fprintf(stderr, "---> %s\n", e.bt_strings[i] + 4);
45 void mmalloc_backtrace_fragment_display(xbt_mheap_t mdp, size_t block, size_t frag){
49 memcpy(&e.bt,&(mdp->heapinfo[block].busy_frag.bt[frag]),sizeof(void*)*XBT_BACKTRACE_SIZE);
50 e.used = XBT_BACKTRACE_SIZE;
52 xbt_ex_setup_backtrace(&e);
54 fprintf(stderr, "(backtrace not set)\n");
55 } else if (e.bt_strings == NULL) {
56 fprintf(stderr, "(backtrace not ready to be computed. %s)\n",xbt_binary_name?"Dunno why":"xbt_binary_name not setup yet");
60 fprintf(stderr, "Backtrace of where the fragment %zu in block %zu was malloced (%d frames):\n", frag, block ,e.used);
61 for (i = 0; i < e.used; i++) /* no need to display "xbt_backtrace_display" */{
62 fprintf(stderr,"%d",i);fflush(NULL);
63 fprintf(stderr, "---> %s\n", e.bt_strings[i] + 4);
68 int mmalloc_compare_heap(xbt_mheap_t mdp1, xbt_mheap_t mdp2){
70 if(mdp1 == NULL && mdp2 == NULL){
71 fprintf(stderr, "Malloc descriptors null\n");
75 int errors = mmalloc_compare_mdesc(mdp1, mdp2);
81 int mmalloc_compare_mdesc(struct mdesc *mdp1, struct mdesc *mdp2){
85 if(mdp1->heaplimit != mdp2->heaplimit){
86 fprintf(stderr,"Different limit of valid info table indices\n");
90 void* s_heap = (char *)mmalloc_get_current_heap() - STD_HEAP_SIZE - getpagesize();
92 void *heapbase1 = (char *)mdp1 + BLOCKSIZE;
93 void *heapbase2 = (char *)mdp2 + BLOCKSIZE;
96 void *addr_block1 = NULL, *addr_block2 = NULL, *addr_frag1 = NULL, *addr_frag2 = NULL;
103 int total_distance = 0;
106 void *address_pointed1 = NULL, *address_pointed2 = NULL;
108 int block_pointed1, block_pointed2, frag_pointed1, frag_pointed2;
109 void *addr_block_pointed1 = NULL, *addr_block_pointed2 = NULL, *addr_frag_pointed1 = NULL, *addr_frag_pointed2 = NULL;
111 /* Check busy blocks*/
113 while(i < mdp1->heaplimit){
115 if(mdp1->heapinfo[i].type != mdp2->heapinfo[i].type){
116 fprintf(stderr,"Different type of block : %d - %d\n", mdp1->heapinfo[i].type, mdp2->heapinfo[i].type);
120 /* Get address of block i in each heap */
121 addr_block1 = ((void*) (((ADDR2UINT(i)) - 1) * BLOCKSIZE + (char*)heapbase1));
122 addr_block2 = ((void*) (((ADDR2UINT(i)) - 1) * BLOCKSIZE + (char*)heapbase2));
124 if(mdp1->heapinfo[i].type == 0){ /* busy large block */
126 if(mdp1->heapinfo[i].busy_block.size != mdp2->heapinfo[i].busy_block.size){
127 fprintf(stderr,"Different size of a large cluster : %zu - %zu\n", mdp1->heapinfo[i].busy_block.size, mdp2->heapinfo[i].busy_block.size);
132 if(mdp1->heapinfo[i].busy_block.busy_size != mdp2->heapinfo[i].busy_block.busy_size){
133 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);
138 /* Hamming distance on different blocks */
142 for(k=0;k<mdp1->heapinfo[i].busy_block.busy_size;k++){
144 if(memcmp(((char *)addr_block1) + k, ((char *)addr_block2) + k, 1) != 0){
146 fprintf(stderr, "Different byte (offset=%d) (%p - %p) in block %zu\n", k, (char *)addr_block1 + k, (char *)addr_block2 + k, i); fflush(NULL);
148 /* Check if pointer difference */
149 pointer_align = (k >> sizeof(void*)) * sizeof(void*);
150 address_pointed1 = *((void **)((char *)addr_block1 + pointer_align));
151 address_pointed2 = *((void **)((char *)addr_block2 + pointer_align));
153 fprintf(stderr, "Addresses pointed : %p - %p\n", address_pointed1, address_pointed2);
155 block_pointed1 = ((char*)address_pointed1 - (char*)((struct mdesc*)s_heap)->heapbase) / BLOCKSIZE + 1;
156 block_pointed2 = ((char*)address_pointed2 - (char*)((struct mdesc*)s_heap)->heapbase) / BLOCKSIZE + 1;
158 fprintf(stderr, "Blocks pointed : %d - %d\n", block_pointed1, block_pointed2);
160 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) {
161 fprintf(stderr, "Unknown pointer(s) ! \n");
167 /*if(((char *) address_pointed1 > (char*)((struct mdesc*)s_heap)->heapbase) && (block_pointed1 < mdp1->heapsize) && (block_pointed1 >= 1)){
168 addr_block_pointed1 = ((void*) (((ADDR2UINT((size_t)block_pointed1)) - 1) * BLOCKSIZE + (char*)heapbase1));
169 if(((char *) address_pointed2 > (char*)((struct mdesc*)s_heap)->heapbase) && (block_pointed2 < mdp2->heapsize) && (block_pointed2 >= 1)){
170 addr_block_pointed2 = ((void*) (((ADDR2UINT((size_t)block_pointed2)) - 1) * BLOCKSIZE + (char*)heapbase2));
172 addr_block_pointed2 = addr_block2;
176 addr_block_pointed1 = addr_block1;
178 if(((char *) address_pointed2 > (char*)((struct mdesc*)s_heap)->heapbase) && (block_pointed2 < mdp2->heapsize) && (block_pointed2 >= 1)){
179 addr_block_pointed2 = ((void*) (((ADDR2UINT((size_t)block_pointed2)) - 1) * BLOCKSIZE + (char*)heapbase2));
181 fprintf(stderr, "Unknown pointers ! \n");
188 addr_block_pointed1 = ((void*) (((ADDR2UINT((size_t)block_pointed1)) - 1) * BLOCKSIZE + (char*)heapbase1));
189 addr_block_pointed2 = ((void*) (((ADDR2UINT((size_t)block_pointed2)) - 1) * BLOCKSIZE + (char*)heapbase2));
191 if(mdp1->heapinfo[block_pointed1].type == mdp2->heapinfo[block_pointed2].type){
193 if(mdp1->heapinfo[block_pointed1].type == 0){ // Large block
195 if(mdp1->heapinfo[block_pointed1].busy_block.busy_size == mdp2->heapinfo[block_pointed2].busy_block.busy_size){
197 if(memcmp(addr_block_pointed1, addr_block_pointed2, mdp1->heapinfo[block_pointed1].busy_block.busy_size) != 0){
200 fprintf(stderr, "False difference detected\n");
207 }else{ // Fragmented block
210 frag_pointed1 = ((uintptr_t) (ADDR2UINT (address_pointed1) % (BLOCKSIZE))) >> mdp1->heapinfo[block_pointed1].type;
211 frag_pointed2 = ((uintptr_t) (ADDR2UINT (address_pointed2) % (BLOCKSIZE))) >> mdp2->heapinfo[block_pointed2].type;
213 fprintf(stderr, "Fragments pointed : %d - %d\n", frag_pointed1, frag_pointed2);
215 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)))){
216 fprintf(stderr, "Unknown pointer(s) ! \n");
222 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]);
224 if(mdp1->heapinfo[block_pointed1].busy_frag.frag_size[frag_pointed1] == mdp2->heapinfo[block_pointed2].busy_frag.frag_size[frag_pointed2]){
226 addr_frag_pointed1 = (char *)addr_block_pointed1 + (frag_pointed1 * (int)pow(2, mdp1->heapinfo[block_pointed1].type));
227 addr_frag_pointed2 = (char *)addr_block_pointed2 + (frag_pointed2 * (int)pow(2, mdp2->heapinfo[block_pointed2].type));
229 if(memcmp(addr_frag_pointed1, addr_frag_pointed2, mdp1->heapinfo[block_pointed1].busy_frag.frag_size[frag_pointed1]) != 0){
232 fprintf(stderr, "False difference detected\n");
242 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))){
243 fprintf(stderr, "Pointers on blocks with different types \n");
247 frag_pointed1 = ((uintptr_t) (ADDR2UINT (address_pointed1) % (BLOCKSIZE))) >> mdp1->heapinfo[block_pointed1].type;
248 frag_pointed2 = ((uintptr_t) (ADDR2UINT (address_pointed2) % (BLOCKSIZE))) >> mdp2->heapinfo[block_pointed2].type;
250 fprintf(stderr, "Fragments pointed : %d - %d\n", frag_pointed1, frag_pointed2);
252 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)))){
253 fprintf(stderr, "Unknown pointer(s) ! \n");
259 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]);
261 if(mdp1->heapinfo[block_pointed1].busy_frag.frag_size[frag_pointed1] == mdp2->heapinfo[block_pointed2].busy_frag.frag_size[frag_pointed2]){
263 addr_frag_pointed1 = (char *)addr_block_pointed1 + (frag_pointed1 * (int)pow(2, mdp1->heapinfo[block_pointed1].type));
264 addr_frag_pointed2 = (char *)addr_block_pointed2 + (frag_pointed2 * (int)pow(2, mdp2->heapinfo[block_pointed2].type));
266 if(memcmp(addr_frag_pointed1, addr_frag_pointed2, mdp1->heapinfo[block_pointed1].busy_frag.frag_size[frag_pointed1]) != 0){
269 fprintf(stderr, "False difference detected\n");
283 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);
285 fprintf(stderr, "Hamming distance between blocks : %d\n", distance);
286 mmalloc_backtrace_block_display(mdp1, i);
287 mmalloc_backtrace_block_display(mdp2, i);
288 fprintf(stderr, "\n");
290 total_distance += distance;
297 if(mdp1->heapinfo[i].type > 0){ /* busy fragmented block */
299 if(mdp1->heapinfo[i].type != mdp2->heapinfo[i].type){
300 fprintf(stderr,"Different size of fragments in fragmented block %zu : %d - %d\n", i, mdp1->heapinfo[i].type, mdp2->heapinfo[i].type); fflush(NULL);
304 if(mdp1->heapinfo[i].busy_frag.nfree != mdp2->heapinfo[i].busy_frag.nfree){
305 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);
309 if(mdp1->heapinfo[i].busy_frag.first != mdp2->heapinfo[i].busy_frag.first){
310 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);
314 frag_size = pow(2, mdp1->heapinfo[i].type);
316 for(j=0; j< (BLOCKSIZE/frag_size); j++){
318 if(mdp1->heapinfo[i].busy_frag.frag_size[j] != mdp2->heapinfo[i].busy_frag.frag_size[j]){
319 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);
323 if(mdp1->heapinfo[i].busy_frag.frag_size[j] > 0){
325 addr_frag1 = (char *)addr_block1 + (j * frag_size);
326 addr_frag2 = (char *)addr_block2 + (j * frag_size);
328 /* Hamming distance on different blocks */
331 for(k=0;k<mdp1->heapinfo[i].busy_frag.frag_size[j];k++){
333 if(memcmp(((char *)addr_frag1) + k, ((char *)addr_frag2) + k, 1) != 0){
335 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);
337 pointer_align = (k / sizeof(void*)) * sizeof(void*);
338 address_pointed1 = *((void **)((char *)addr_frag1 + pointer_align));
339 address_pointed2 = *((void **)((char *)addr_frag2 + pointer_align));
341 fprintf(stderr, "Addresses pointed : %p - %p\n", address_pointed1, address_pointed2);
343 block_pointed1 = ((char*)address_pointed1 - (char*)((struct mdesc*)s_heap)->heapbase) / BLOCKSIZE + 1;
344 block_pointed2 = ((char*)address_pointed2 - (char*)((struct mdesc*)s_heap)->heapbase) / BLOCKSIZE + 1;
346 fprintf(stderr, "Blocks pointed : %d - %d\n", block_pointed1, block_pointed2);
348 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) {
349 fprintf(stderr, "Unknown pointer ! \n");
355 /*if(((char *) address_pointed1 > (char*)((struct mdesc*)s_heap)->heapbase) && (block_pointed1 < mdp1->heapsize) && (block_pointed1 >= 1)){
356 addr_block_pointed1 = ((void*) (((ADDR2UINT((size_t)block_pointed1)) - 1) * BLOCKSIZE + (char*)heapbase1));
358 if(((char *) address_pointed2 > (char*)((struct mdesc*)s_heap)->heapbase) && (block_pointed2 < mdp2->heapsize) && (block_pointed2 >= 1)){
359 addr_block_pointed2 = ((void*) (((ADDR2UINT((size_t)block_pointed2)) - 1) * BLOCKSIZE + (char*)heapbase2));
363 addr_block_pointed2 = addr_block2;
367 addr_block_pointed1 = addr_block1;
370 if(((char *) address_pointed2 > (char*)((struct mdesc*)s_heap)->heapbase) && (block_pointed2 < mdp2->heapsize) && (block_pointed2 >= 1)){
371 addr_block_pointed2 = ((void*) (((ADDR2UINT((size_t)block_pointed2)) - 1) * BLOCKSIZE + (char*)heapbase2));
374 fprintf(stderr, "Unknown pointers ! \n");
381 addr_block_pointed1 = ((void*) (((ADDR2UINT((size_t)block_pointed1)) - 1) * BLOCKSIZE + (char*)heapbase1));
382 addr_block_pointed2 = ((void*) (((ADDR2UINT((size_t)block_pointed2)) - 1) * BLOCKSIZE + (char*)heapbase2));
384 if(mdp1->heapinfo[block_pointed1].type == mdp2->heapinfo[block_pointed2].type){
386 if(mdp1->heapinfo[block_pointed1].type == 0){ // Large block
388 if(mdp1->heapinfo[block_pointed1].busy_block.busy_size == mdp2->heapinfo[block_pointed2].busy_block.busy_size){
390 if(memcmp(addr_block_pointed1, addr_block_pointed2, mdp1->heapinfo[block_pointed1].busy_block.busy_size) != 0){
393 fprintf(stderr, "False difference detected\n");
400 }else{ // Fragmented block
403 frag_pointed1 = ((uintptr_t) (ADDR2UINT (address_pointed1) % (BLOCKSIZE))) >> mdp1->heapinfo[block_pointed1].type;
404 frag_pointed2 = ((uintptr_t) (ADDR2UINT (address_pointed2) % (BLOCKSIZE))) >> mdp2->heapinfo[block_pointed2].type;
406 fprintf(stderr, "Fragments pointed : %d - %d\n", frag_pointed1, frag_pointed2);
408 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)))){
409 fprintf(stderr, "Unknown pointer ! \n");
415 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]);
417 if(mdp1->heapinfo[block_pointed1].busy_frag.frag_size[frag_pointed1] == mdp2->heapinfo[block_pointed2].busy_frag.frag_size[frag_pointed2]){
419 addr_frag_pointed1 = (char *)addr_block_pointed1 + (frag_pointed1 * (int)pow(2, mdp1->heapinfo[block_pointed1].type));
420 addr_frag_pointed2 = (char *)addr_block_pointed2 + (frag_pointed2 * (int)pow(2, mdp2->heapinfo[block_pointed2].type));
422 if(memcmp(addr_frag_pointed1, addr_frag_pointed2, mdp1->heapinfo[block_pointed1].busy_frag.frag_size[frag_pointed1]) != 0){
425 fprintf(stderr, "False difference detected\n");
435 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))){
436 fprintf(stderr, "Pointers on blocks with different types \n");
440 frag_pointed1 = ((uintptr_t) (ADDR2UINT (address_pointed1) % (BLOCKSIZE))) >> mdp1->heapinfo[block_pointed1].type;
441 frag_pointed2 = ((uintptr_t) (ADDR2UINT (address_pointed2) % (BLOCKSIZE))) >> mdp2->heapinfo[block_pointed2].type;
443 fprintf(stderr, "Fragments pointed : %d - %d\n", frag_pointed1, frag_pointed2);
445 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)))){
446 fprintf(stderr, "Unknown pointers ! \n");
452 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]);
454 if(mdp1->heapinfo[block_pointed1].busy_frag.frag_size[frag_pointed1] == mdp2->heapinfo[block_pointed2].busy_frag.frag_size[frag_pointed2]){
456 addr_frag_pointed1 = (char *)addr_block_pointed1 + (frag_pointed1 * (int)pow(2, mdp1->heapinfo[block_pointed1].type));
457 addr_frag_pointed2 = (char *)addr_block_pointed2 + (frag_pointed2 * (int)pow(2, mdp2->heapinfo[block_pointed2].type));
459 if(memcmp(addr_frag_pointed1, addr_frag_pointed2, mdp1->heapinfo[block_pointed1].busy_frag.frag_size[frag_pointed1]) != 0){
462 fprintf(stderr, "False difference detected\n");
476 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);
477 fprintf(stderr, "Hamming distance between fragments : %d\n", distance);
478 mmalloc_backtrace_fragment_display(mdp1, i, j);
479 mmalloc_backtrace_fragment_display(mdp2, i, j);
480 fprintf(stderr, "\n");
482 total_distance += distance;
491 }else{ /* free block */
502 fprintf(stderr, "Hamming distance between heap regions : %d\n", total_distance);
508 /* void *get_end_addr_heap(void *heap){ */
510 /* FILE *fp; /\* File pointer to process's proc maps file *\/ */
511 /* char *line = NULL; /\* Temporal storage for each line that is readed *\/ */
512 /* ssize_t read; /\* Number of bytes readed *\/ */
513 /* size_t n = 0; /\* Amount of bytes to read by getline *\/ */
515 /* fp = fopen("/proc/self/maps", "r"); */
518 /* perror("fopen failed"); */
521 /* xbt_dynar_t lfields = NULL; */
522 /* xbt_dynar_t start_end = NULL; */
523 /* void *start_addr; */
524 /* void *end_addr; */
526 /* while ((read = getline(&line, &n, fp)) != -1) { */
528 /* xbt_str_trim(line, NULL); */
529 /* xbt_str_strip_spaces(line); */
530 /* lfields = xbt_str_split(line,NULL); */
532 /* start_end = xbt_str_split(xbt_dynar_get_as(lfields, 0, char*), "-"); */
533 /* start_addr = (void *) strtoul(xbt_dynar_get_as(start_end, 0, char*), NULL, 16); */
534 /* end_addr = (void *) strtoul(xbt_dynar_get_as(start_end, 1, char*), NULL, 16); */
536 /* if(start_addr == heap){ */
539 /* xbt_dynar_reset(lfields); */
540 /* xbt_free(lfields); */
541 /* xbt_dynar_reset(start_end); */
542 /* xbt_free(start_end); */
543 /* return end_addr; */
548 /* xbt_dynar_reset(lfields); */
549 /* xbt_free(lfields); */
550 /* xbt_dynar_reset(start_end); */
551 /* xbt_free(start_end); */