Home | History | Annotate | Download | only in dist

Lines Matching refs:hdr

47 struct hdr
69 static enum mcheck_status checkhdr __P ((const struct hdr *));
71 checkhdr (hdr)
72 const struct hdr *hdr;
75 switch (hdr->magic)
84 if (((char *) &hdr[1])[hdr->size] != MAGICBYTE)
100 struct hdr *hdr = ((struct hdr *) ptr) - 1;
101 checkhdr (hdr);
102 hdr->magic = MAGICFREE;
103 flood (ptr, FREEFLOOD, hdr->size);
105 free (hdr);
114 struct hdr *hdr;
117 hdr = (struct hdr *) malloc (sizeof (struct hdr) + size + 1);
119 if (hdr == NULL)
122 hdr->size = size;
123 hdr->magic = MAGICWORD;
124 ((char *) &hdr[1])[size] = MAGICBYTE;
125 flood ((__ptr_t) (hdr + 1), MALLOCFLOOD, size);
126 return (__ptr_t) (hdr + 1);
135 struct hdr *hdr = ((struct hdr *) ptr) - 1;
136 __malloc_size_t osize = hdr->size;
138 checkhdr (hdr);
144 hdr = (struct hdr *) realloc ((__ptr_t) hdr, sizeof (struct hdr) + size + 1);
148 if (hdr == NULL)
151 hdr->size = size;
152 hdr->magic = MAGICWORD;
153 ((char *) &hdr[1])[size] = MAGICBYTE;
155 flood ((char *) (hdr + 1) + osize, MALLOCFLOOD, size - osize);
156 return (__ptr_t) (hdr + 1);