Lines Matching defs:ptr
63 #define free_t void /* ANSI says void free(ptr_t ptr) */
67 #define free_t int /* BSD says int free(ptr_t ptr) */
92 static Freehdr freehdrptr = NIL; /* ptr to block of available headers */
156 Freehdr *fpp; /* Address of ptr to subtree */
424 Freehdr allocp; /* ptr to node to be allocated */
560 * If the ptr is not from the sbrk'ed space, return.
564 free(ptr_t ptr)
583 if ( misaligned(ptr) ) {
584 error("free: illegal address (%#x)\n", ptr);
592 if( ptr < (ptr_t)_lbound || ptr > (ptr_t)_ubound ) {
604 oldblk = (Dblk)((char*)ptr - ALIGNSIZ);
665 (int)ptr);
678 error("free: block %#x was already free\n", (int)ptr);
731 * realloc(ptr, nbytes)
737 * For backwards compatibility, ptr is allowed to reference
745 * free(ptr);
748 * ptr = realloc(ptr,nbytes);
753 realloc(ptr_t ptr, uint nbytes)
768 if (ptr == NULL) {
782 if ( misaligned(ptr) ||
783 ptr < (ptr_t)_lbound ||
784 ptr > (ptr_t)_ubound ) {
785 error("realloc: illegal address (%#x)\n", ptr);
794 oldblk = (Dblk)((char*)ptr - ALIGNSIZ);
902 ptr = malloc(nbytes);
903 if (ptr != NULL) {
904 bcopy(oldblk->data, ptr, oldsize-ALIGNSIZ);
907 return(ptr);