Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
deb21f0f
Commit
deb21f0f
authored
Jan 06, 2001
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Log memory context stats to stderr when reporting a 'Memory exhausted'
error, so as to provide a starting point for debugging.
parent
e69b8d46
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
src/backend/utils/mmgr/aset.c
src/backend/utils/mmgr/aset.c
+13
-1
No files found.
src/backend/utils/mmgr/aset.c
View file @
deb21f0f
...
...
@@ -11,7 +11,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/mmgr/aset.c,v 1.3
5 2000/12/05 23:40:36
tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/mmgr/aset.c,v 1.3
6 2001/01/06 21:59:39
tgl Exp $
*
* NOTE:
* This is a new (Feb. 05, 1999) implementation of the allocation set
...
...
@@ -324,7 +324,10 @@ AllocSetContextCreate(MemoryContext parent,
block
=
(
AllocBlock
)
malloc
(
blksize
);
if
(
block
==
NULL
)
{
MemoryContextStats
(
TopMemoryContext
);
elog
(
ERROR
,
"Memory exhausted in AllocSetContextCreate()"
);
}
block
->
aset
=
context
;
block
->
freeptr
=
((
char
*
)
block
)
+
ALLOC_BLOCKHDRSZ
;
block
->
endptr
=
((
char
*
)
block
)
+
blksize
;
...
...
@@ -482,7 +485,10 @@ AllocSetAlloc(MemoryContext context, Size size)
blksize
=
chunk_size
+
ALLOC_BLOCKHDRSZ
+
ALLOC_CHUNKHDRSZ
;
block
=
(
AllocBlock
)
malloc
(
blksize
);
if
(
block
==
NULL
)
{
MemoryContextStats
(
TopMemoryContext
);
elog
(
ERROR
,
"Memory exhausted in AllocSetAlloc()"
);
}
block
->
aset
=
set
;
block
->
freeptr
=
block
->
endptr
=
((
char
*
)
block
)
+
blksize
;
...
...
@@ -673,7 +679,10 @@ AllocSetAlloc(MemoryContext context, Size size)
}
if
(
block
==
NULL
)
{
MemoryContextStats
(
TopMemoryContext
);
elog
(
ERROR
,
"Memory exhausted in AllocSetAlloc()"
);
}
block
->
aset
=
set
;
block
->
freeptr
=
((
char
*
)
block
)
+
ALLOC_BLOCKHDRSZ
;
...
...
@@ -843,7 +852,10 @@ AllocSetRealloc(MemoryContext context, void *pointer, Size size)
blksize
=
chksize
+
ALLOC_BLOCKHDRSZ
+
ALLOC_CHUNKHDRSZ
;
block
=
(
AllocBlock
)
realloc
(
block
,
blksize
);
if
(
block
==
NULL
)
{
MemoryContextStats
(
TopMemoryContext
);
elog
(
ERROR
,
"Memory exhausted in AllocSetReAlloc()"
);
}
block
->
freeptr
=
block
->
endptr
=
((
char
*
)
block
)
+
blksize
;
/* Update pointers since block has likely been moved */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment