Changeset 8232 for trunk/psLib/src/sys/psMemory.c
- Timestamp:
- Aug 8, 2006, 1:32:23 PM (20 years ago)
- Location:
- trunk/psLib/src
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
sys/psMemory.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src
- Property svn:ignore
-
old new 10 10 libpslib.la.temp 11 11 config.h.in 12 psErrorText.h13 12 *.bb 14 13 *.bbg
-
- Property svn:ignore
-
trunk/psLib/src/sys/psMemory.c
r7901 r8232 8 8 * @author Robert Lupton, Princeton University 9 9 * 10 * @version $Revision: 1.7 4$ $Name: not supported by cvs2svn $11 * @date $Date: 2006-0 7-14 02:26:25$10 * @version $Revision: 1.75 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2006-08-08 23:32:23 $ 12 12 * 13 13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 33 33 #include "psLine.h" 34 34 #include "psRegion.h" 35 #include "psErrorText.h" 35 36 36 37 37 #define P_PS_MEMMAGIC (psPtr )0xdeadbeef // Magic number in psMemBlock header … … 126 126 if (ptr->refCounter < 1) { 127 127 psError(PS_ERR_MEMORY_CORRUPTION, false, 128 PS_ERRORTEXT_psMemory_MULTIPLE_FREE,128 _("Block %lu, allocated at %s:%d, freed multiple times at %s:%d."), 129 129 (unsigned long)ptr->id, ptr->file, ptr->lineno, file, lineno); 130 130 } … … 148 148 if (m == NULL) { 149 149 psError(PS_ERR_MEMORY_CORRUPTION, true, 150 PS_ERRORTEXT_psMemory_NULL_BLOCK);150 _("NULL memory block found.")); 151 151 return 1; 152 152 } … … 155 155 // using an unreferenced block of memory, are you? 156 156 psError(PS_ERR_MEMORY_CORRUPTION, true, 157 PS_ERRORTEXT_psMemory_DEREF_BLOCK_USE,157 _("Memory block %lu was freed but still being used."), 158 158 (unsigned long)m->id); 159 159 return 1; … … 162 162 if (m->startblock != P_PS_MEMMAGIC || m->endblock != P_PS_MEMMAGIC) { 163 163 psError(PS_ERR_MEMORY_CORRUPTION, true, 164 PS_ERRORTEXT_psMemory_UNDERFLOW,164 _("Memory block %lu is corrupted; buffer underflow detected."), 165 165 (unsigned long)m->id); 166 166 return 1; … … 168 168 if (*(psPtr *)((int8_t *) (m + 1) + m->userMemorySize) != P_PS_MEMMAGIC) { 169 169 psError(PS_ERR_MEMORY_CORRUPTION, true, 170 PS_ERRORTEXT_psMemory_OVERFLOW,170 _("Memory block %lu is corrupted; buffer overflow detected."), 171 171 (unsigned long)m->id); 172 172 return 1; … … 506 506 psMemBlock* ptr = ((psMemBlock* ) vptr) - 1; 507 507 508 psAbort(__func__, PS_ERRORTEXT_psMemory_MULTIPLE_FREE,508 psAbort(__func__,_("Block %lu, allocated at %s:%d, freed multiple times at %s:%d."), 509 509 (unsigned long)ptr->id, ptr->file, ptr->lineno, filename, lineno); 510 510 }
Note:
See TracChangeset
for help on using the changeset viewer.
