Changeset 669
- Timestamp:
- Sep 9, 2003, 11:50:03 AM (22 years ago)
- Location:
- trunk/src/emx
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/emx/include/emx/umalloc.h
-
Property cvs2svn:cvs-rev
changed from
1.2
to1.3
r668 r669 760 760 761 761 762 static __inline__ void _um_abort (const char *pszmsg) 763 { 764 /* Use the 'syscall' write for safest possible path. */ 765 extern int __write (int handle, const void *buf, size_t nbytes); 766 __write (2, "\r\n!_um_abort!", 13); 767 if (pszmsg) 768 { 769 const char *psz = pszmsg; 770 while (*psz) 771 psz++; 772 __write (2, pszmsg, psz - pszmsg); 773 } 774 __write (2, "\r\n", 2); 775 __asm__ __volatile__ ("int $3"); 776 } 777 778 762 779 #if defined (__cplusplus) 763 780 } -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/malloc/ifree.c
-
Property cvs2svn:cvs-rev
changed from
1.2
to1.3
r668 r669 40 40 break; 41 41 if (*patch == NULL) 42 abort (); 42 { 43 _um_abort ("Corrupt heap? (Patch not found.)"); 44 return; 45 } 43 46 *patch = crate->next; 44 47 … … 123 126 hdr = _HDR_FROM_BLOCK (block); 124 127 if (_UM_HDR_STATUS (hdr) == _UMS_FREE) 125 abort (); 128 { 129 _um_abort ("Tried to free block twice! (free)"); 130 return; 131 } 126 132 parent = _PTR_FROM_UMINT (hdr->parent, _umagic); 127 133 switch (*parent) … … 136 142 break; 137 143 default: 138 abort (); 144 _um_abort ("Corrupt heap or passing wrong pointer to free! (bad parent magic)"); 145 return; 146 139 147 } 140 148 } -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/malloc/irealloc.c
-
Property cvs2svn:cvs-rev
changed from
1.2
to1.3
r668 r669 309 309 hdr = _HDR_FROM_BLOCK (block); 310 310 if (_UM_HDR_STATUS (hdr) == _UMS_FREE) 311 abort (); 311 { 312 _um_abort ("Tried to free block twice! (realloc)"); 313 return NULL; 314 } 312 315 parent = _PTR_FROM_UMINT (hdr->parent, _umagic); 313 316 switch (*parent) … … 323 326 align, flags); 324 327 default: 325 abort (); 326 } 327 } 328 { 329 _um_abort ("Corrupt heap or passing wrong pointer to realloc! (bad parent magic)"); 330 return NULL; 331 } 332 } 333 } -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.