aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/utils')
-rw-r--r--src/backend/utils/error/excid.c14
-rw-r--r--src/backend/utils/mmgr/mcxt.c12
2 files changed, 8 insertions, 18 deletions
diff --git a/src/backend/utils/error/excid.c b/src/backend/utils/error/excid.c
index bef1c00856b..877610176a3 100644
--- a/src/backend/utils/error/excid.c
+++ b/src/backend/utils/error/excid.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/error/Attic/excid.c,v 1.9 2001/01/24 19:43:15 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/error/Attic/excid.c,v 1.10 2001/02/06 01:53:53 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -43,18 +43,6 @@ Exception BadArg = {"Bad Argument to Function Call"};
*****************************************************************************/
/*
- * BadAllocSize
- * Indicates that an allocation request is of unreasonable size.
- */
-Exception BadAllocSize = {"Too Large Allocation Request"};
-
-/*
- * ExhaustedMemory
- * Indicates an dynamic memory allocation failed.
- */
-Exception ExhaustedMemory = {"Memory Allocation Failed"};
-
-/*
* Unimplemented
* Indicates a function call request requires unimplemented code.
*/
diff --git a/src/backend/utils/mmgr/mcxt.c b/src/backend/utils/mmgr/mcxt.c
index 0520cb6d0a6..ab8434a0581 100644
--- a/src/backend/utils/mmgr/mcxt.c
+++ b/src/backend/utils/mmgr/mcxt.c
@@ -14,7 +14,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/mmgr/mcxt.c,v 1.26 2001/01/24 19:43:16 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/mmgr/mcxt.c,v 1.27 2001/02/06 01:53:53 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -417,8 +417,9 @@ MemoryContextAlloc(MemoryContext context, Size size)
{
AssertArg(MemoryContextIsValid(context));
- LogTrap(!AllocSizeIsValid(size), BadAllocSize,
- ("size=%d [0x%x]", size, size));
+ if (!AllocSizeIsValid(size))
+ elog(ERROR, "MemoryContextAlloc: invalid request size %lu",
+ (unsigned long) size);
return (*context->methods->alloc) (context, size);
}
@@ -474,8 +475,9 @@ repalloc(void *pointer, Size size)
AssertArg(MemoryContextIsValid(header->context));
- LogTrap(!AllocSizeIsValid(size), BadAllocSize,
- ("size=%d [0x%x]", size, size));
+ if (!AllocSizeIsValid(size))
+ elog(ERROR, "repalloc: invalid request size %lu",
+ (unsigned long) size);
return (*header->context->methods->realloc) (header->context,
pointer, size);