Lines Matching refs:uptr
174 #define user2malloc_(uptr) (((char*)(void*)uptr)-sizeof(Word))
202 #define user_nsize1_(uptr) nsize1_(user2malloc_(uptr))
203 #define user_nsize2_(uptr) nsize2_(user2malloc_(uptr))
207 #define user_tail_nsize1_(uptr) tail_nsize1_(user2malloc_(uptr))
208 #define user_tail_nsize2_(uptr) tail_nsize2_(user2malloc_(uptr))
305 void *uptr = malloc2user_(mptr);
309 int ch = ((unsigned char*)uptr)[i];
320 error_message("Error: %p contains user data: %s", uptr, temp);
423 memory_check(void *uptr, int mid, const char *mfile, int mline, const char *file, int line)
429 clobbered_ptr = uptr;
430 if (uptr == NULL)
436 clobbered_ptr = (char*)&user_nsize1_(uptr);
437 neg_nbytes = user_nsize1_(uptr);
439 memory_error(user2malloc_(uptr), "memory_check", mid, mfile, mline, file, line);
442 clobbered_ptr = (char*)&user_nsize2_(uptr);
443 if (neg_nbytes != user_nsize2_(uptr))
444 memory_error(user2malloc_(uptr), "memory_check", mid, mfile, mline, file, line);
447 clobbered_ptr = (char*)&user_tail_nsize1_(uptr);
448 if (neg_nbytes != user_tail_nsize1_(uptr))
449 memory_error(user2malloc_(uptr), "memory_check", mid, mfile, mline, file, line);
452 clobbered_ptr = (char*)&user_tail_nsize2_(uptr);
453 if (neg_nbytes != user_tail_nsize2_(uptr))
454 memory_error(user2malloc_(uptr), "memory_check", mid, mfile, mline, file, line);
467 p = ((char *) (uptr)) + nbytes;
472 memory_error(user2malloc_(uptr), "memory_check", mid, mfile, mline, file, line);
517 actual_free(void *uptr, const char *file, int line)
523 if ( uptr == NULL )
525 mptr = user2malloc_(uptr);
526 memory_check(uptr, (mid=MID(mptr)), (mfile=MFILE(mptr)), (mline=MLINE(mptr)), file, line);
528 memory_check(uptr, mid, mfile, mline, file, line);
545 delayed_free(void *uptr, const char* file, int line)
550 if ( uptr==NULL )
552 mptr = user2malloc_(uptr);
553 memory_check(uptr, MID(mptr), MFILE(mptr), MLINE(mptr), file, line);
557 free_delay[free_delay_pos] = uptr;
560 nbytes = -user_nsize1_(uptr);
562 (void)memset(uptr, FREED_CHAR, (size_t)nbytes);
582 debug_free(void *uptr, const char *file, int line)
586 if (uptr == NULL)
589 delayed_free(uptr, file, line);
591 actual_free(uptr, file, line);
600 void *uptr;
611 uptr = malloc2user_(mptr);
613 (void)memset(uptr, ALLOC_CHAR, (size_t)nbytes);
615 return uptr;
619 debug_realloc(void *uptr, size_t nbytes, const char *file, int line)
627 oldmptr = user2malloc_(uptr);
631 if (uptr != NULL) {
632 memory_check(uptr, MID(oldmptr), MFILE(oldmptr), MLINE(oldmptr), file, line);
633 oldnbytes = -user_nsize1_(uptr);
635 memory_check(uptr, MID(oldmptr), MFILE(oldmptr), MLINE(oldmptr), file, line);
637 if (uptr == NULL) {
649 if (uptr == NULL)
682 void *uptr;
697 uptr = malloc2user_(mptr);
698 (void)strcpy((char*)uptr, s1);
699 return (char*)uptr;